I decided that I didn't like my loop for passing one file at a time to the unpack command. So I've replaced that single line in my script with the following three lines:
set FILELIST=
for /D %%f in (dataFiles\*) do set FILELIST=!FILELIST! %%~nf
call canvasDataCli unpack -c config.js -f%FILELIST%
This change creates a new variable called FILELIST (first line) and concatenates all the directory names in the dataFiles directory into that variable (second line). Then I just call the unpack command one time (third line) and give it my variable name which contains all directory names created by the earlier SYNC command. This allows nodejs to do all the multi-threading which greatly increases the speed of the unpack process compared to my first method of sending 56 files one-file-at-a-time to be unpacked with 56 different unpack commands in sequence.
Also, if you are like me and don't want to unpack the huge requests file every time this runs, you can just add the following two lines above and below the snippet above to hide the requests directory during the unpack process and then show it again when finished.
attrib +h /d /s dataFiles\requests
{insert code snippet above here}
attrib -h /d /s dataFiles\requests
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.