Inside a batch file on Windows, I use 7-zip like this:
...\right_path\7z a output_file_name.zip file_to_be_compressed
How could I check the exit code of 7z
and take the appropriate action ?
batchwindows xp
Inside a batch file on Windows, I use 7-zip like this:
...\right_path\7z a output_file_name.zip file_to_be_compressed
How could I check the exit code of 7z
and take the appropriate action ?
Best Answer
Test for a return code greater than or equal to 1:
or
or test for a return code equal to 0:
You can use other commands such as
GOTO
where I showecho
.