7zip - Cannot find archive

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Nikroma
Posts: 2
Joined: 12 Sep 2012 09:30

7zip - Cannot find archive

#1 Post by Nikroma » 17 Sep 2012 06:22

Im using 7zip
I want to extract a couple of ZIP files to different places and this should happen automatically without my intervention.

But sometimes the archives is not in place (reason not necessary) and then I get the error message "Can not find archive". This error I have to manually press OKAY

Is there any command that can bypass or press YES to the question?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: 7zip - Cannot find archive

#2 Post by foxidrive » 17 Sep 2012 09:13

Use if exist to only perform the action if the file is there. Similar to this:


Code: Select all

if exist "file.7z" "c:\program files\7-zip\7z.exe"  x "file.7z"

Post Reply