- Feb 13, 2014
- 7
- 0
- 0
im writing a batch file for our FTP server to automatically extract .zip(s) in the morning. However, if the file is corrupt an error will pop up halting the rest of the batch till the winrar message is dealt with. the message has 3 choices. close, Break Operations or copy to clipboard. i was wondering if there are any commands or switches that would be able to close that error if it pops up. I did a rar.exe /? and there is a switch for assuming Yes but if a different error pops up that could cause an issue.
This next question is a noob one but where would i place this switch? Heres the block of code regarding the extraction/deletion of the .zip. I didnt write this part of the batch so this is why i ask
P.S. I'm using winrar.exe not rar.exe sense rar.exe doesn't work with zip files. the software we use for pushing the files to the server can only compress to zip so rar is not an option.
This next question is a noob one but where would i place this switch? Heres the block of code regarding the extraction/deletion of the .zip. I didnt write this part of the batch so this is why i ask
Code:
REM ** Extraction **
for %%i in ("C:\FTP\Happy Sappy\21st\RMFTP*.zip") do "C:\Program Files\WinRAR\winrar.exe" x -o+ "%%i" *.* "C:\FTP\Happy Sappy\21st\" && del "%%i"
REM ** Extraction Check **
for %%i in ("C:\FTP\Happy Sappy\21st\RMFTP*.zip") do echo Error: Extraction issue %%i >> "C:\FTP\! Logs\%DATE:~-4%-%DATE:~4,2%-%DATE:~7,2%.log"
Last edited: