0

Essentially I host all my music on an FTP so friends and family can access it with ease, and I can access it from abroad etc. But the only issue is that each track needs to be downloaded manually.

I was wondering if anyone knows of a way to create some sort of script, maybe a batch file, that can auto ZIP (or RAR) folders in a folder, and any new folders added to that folder, so whole artists/albums can be downloaded at once. This would be pretty neat!

1 Answer 1

1

If there's only one folder deep, then from a batch file:

set zip="c:\program files\7-zip\7z.exe" a -tzip -r
for /d %%f in (c:\myaudiofolder) do if not exist %%~nf.zip %zip% %%~nf.zip %%f

Or, if there are multiple folders and you want each folder to get its own zip file, in the parent folder, again from a batch file:

set zip="c:\program files\7-zip\7z.exe" a -tzip -r
dir c:\myaudiofolder /ad /s /b > c:\myaudiofolder\folders.txt
for /f %%f in (c:\myaudiofolder\folders.txt) do if not exist c:\myaudiofolder\%%~nf.zip %zip% c:\myaudiofolder\%%~nf.zip %%f

You could substitute other executables/parameters to cause the files to be compressed into .rar files, etc. I just wrote it that way to make it easier to read.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .