I want to copy a file and change the directory of that file
Here is my file location:
Test.zip -> Account/Images/ -account.png -icon.png -flag.png . . When I use the script for extracting the files I want to have, just account.png file outside of Images folder :
Account/ - account.png - Images/ icon.png,flag.png Here is my function
function processFiles(fileDir, outputDir, accountData) { var fileDensities; fileDensities.forEach(function(density) { var srcPath = path.join(fileDir, 'Account', output); if (!fs.existsSync(srcPath)) { console.log('Warning: image does not exist' + output); return; }; var outputPath = path.join(outputDir, output); mkdirp.sync(outputPath); var srcFilenames = fs.readdirSync(srcPath); srcFilenames.forEach(function(filename) { }); } Right-now the output is :
Account/Images/account.png,icon.png,flag.png My question is how can I add account.png outside of Images folder
Account/ - account.png - Images/ icon.png,flag.png Thanks in Advance!