I'm trying to use a simple batch file to unzip and overwrite an existing file. Can anyone tell me the correct parameter to use to automatically overwrite without having to intervene please?
The unzip.bat batch file contains:
unzip "G:\Extracts\report.zip" "G:\Extracts\report\"
This works fine except that it asks me to "Replace the file in the destination?"
Unzip command has -o
option, which forces file overwrite. Your batch file should look like this:
unzip -o "G:\Extracts\report.zip" -d "G:\Extracts\report\"
Optionally, you can add -q
for quiet mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With