I want to write a batch script which will Unzip all the .Zip files from a folder A(inside the Folder A, there will be more than 1 .Zip files) and each unzipped file will have a sub directory structure and these sub directories will have some files inside them, I have to copy all these files from the subdirectories and place them in C:\To_BE_Processed folder, but if a file already exists in the folder C:\To_BE_Processed then the existing file should be moved to C:\Already_exsists folder and a log file(.txt) has to generated with the file name is already existing in the directory.
I am using the below script for extracting and placing the files from one zip file to my target directory. I need to implement the same for multiple zip files and if a file already exists in the destination it has to moved to another directory and a log file has to be generated ..How to write a batch script for the same.
@echo off & setLocal EnableDELAYedExpansion
for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\Data') do (
copy "%%a" C:\To_BE_Processed
Thanks & Regards,