Answer the question
In order to leave comments, you need to log in
How to decompress 70K .ZIP files and automatically transfer them to another local drive?
There is a project folder on drive "E" , it contains 70K zip archives, in each of these archives there are many folders and files of this format:
E:\project/6g3der7hehdj.zip/<b>model</b>/gos545trtgf3dysf.txt
E:\project/gtgsr53tfstg7fg.zip/<b>model</b>/6y637hd7o2d3dd.txt
E:\project/rer3wefsfsfsf.zip/<b>model</b>/ferfff43ffw3rwf3dd.txt
Answer the question
In order to leave comments, you need to log in
I figured it out myself, but thanks for some ideas.
Unpacking is performed using a zip archiver. I wrote this code in the cmd file:
7z.exe x -tzip *.zip -aot "Model\*" -o"F:\Model"
pause
You make a script in which you run through each file with a command like:
unzip -o -d f:/ <file.zip> model
due to the fact that there are a lot of files, you need to come up with something with iteration.
If there was bash, I would do it through xargs
In a bat/Powershell script, recursively go through the directory where the archives are located and, one by one, using unzip / 7z / rar, unpack to the desired directory, appending the name of the archive source file to the path. Then all models will be guaranteed to be unpacked and not overwritten.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question