The batch file is indented to move the zip file from my local pc to server which is possible now and the problem is like winzip is not installed on the server so is it possible to move the winzip executable along with batch file and use its commandline to copy the extracted to multiple locations.
my zip file is on my local say \testmachine1\d$\zipfiles\test.zip
(Note: This zip file may contain multiple folders and file)
the batchfile should ask the .
and I would like to move the file to \testmachine2\d$\extractedfiles\
\testmachine3\d$\extractedfiles\
\testmachine4\d$\extractedfiles\
.......................................................
\testmachine[xx]\d$\extractedfiles\
My code looks like this:
- I am asking input on the zip file name, extract folder name, target and destination path along with a logfile path from the user
for /R "%destinationPath%" %%I in (%zipFileNamee%.zip") do (
echo %%I >> %LogFile%
"%ProgramFiles%\WinZip\WinZip64.exe" -e" %%~dpI" "%destinationPath%\%extractFolder%\" >> %LogFile%
I understand there are other utilities to do this like 7zip. Its is prefereable to use winzip or 7zip for the same.