allanc Posted April 20, 2009 Report Share Posted April 20, 2009 I am trying to use 7-Zip and then rename the resulting .exe as per below. The 2nd command does not appear to be executing. However, if the command line only contains the 2nd command, the rename occurs. "I:\Program Files\7-Zip\7z.exe" x "L:\Toolkit\Zip\7_Zip\*.zip" -Y -o"L:\Toolkit\Zip\7_Zip\" && ren L:\Toolkit\Zip\7_Zip\*.exe 7z.exe Thank you in advance. Link to comment Share on other sites More sharing options...
andreone Posted April 20, 2009 Report Share Posted April 20, 2009 Why &&? You're not programming here. Simply put your two lines ... on two lines in the edit box Link to comment Share on other sites More sharing options...
FranciscoR Posted April 20, 2009 Report Share Posted April 20, 2009 Why &&? You're not programming here. Simply put your two lines ... on two lines in the edit box Nope, indeed with Ketarin you need to use symbols like & and && to combine commands. @allanc Can you post log ? Link to comment Share on other sites More sharing options...
allanc Posted April 20, 2009 Author Report Share Posted April 20, 2009 Why &&? You're not programming here. Simply put your two lines ... on two lines in the edit box Nope' date=' indeed with Ketarin you need to use symbols like & and && to combine commands. @allanc Can you post log ?[/quote'] I:\Program Files\Ketarin> 2009/04/20 5:48:10 PM: Update finished 2009/04/20 6:34:31 PM: Update started with 1 application(s) 2009/04/20 6:34:32 PM: _7-Zip: Using referer: (none) 2009/04/20 6:34:32 PM: _7-Zip: Server source file: /download/file/7f331d0d2889b62a09e83bcb42f5ecd1821de43eff905c62bee48a13f81ff2ba 2009/04/20 6:34:32 PM: _7-Zip: Determined target file name: L:\Toolkit\Zip\7_Zip\7z465.exe 2009/04/20 6:34:32 PM: _7-Zip: Checking if update is required... 2009/04/20 6:34:32 PM: _7-Zip: Update required, 'L:\Toolkit\Zip\7_Zip\7z465.exe' does not yet exist 2009/04/20 6:34:39 PM: _7-Zip: Executing command: "I:\Program Files\7-Zip\7z.exe" x "L:\Toolkit\Zip\7_Zip\*.zip" -Y -o"L:\Toolkit\Zip\7_Zip\" && ren L:\Toolkit\Zip\7_Zip\*.exe 7z.exe 2009/04/20 6:34:39 PM: _7-Zip: Command result: I:\Program Files\Ketarin>"I:\Program Files\7-Zip\7z.exe" x "L:\Toolkit\Zip\7_Zip\*.zip" -Y -o"L:\Toolkit\Zip\7_Zip\" && ren L:\Toolkit\Zip\7_Zip\*.exe 7z.exe 7-Zip 4.65 Copyright © 1999-2009 Igor Pavlov 2009-02-03 Error: there is no such archive I:\Program Files\Ketarin> 2009/04/20 6:34:39 PM: Update finished Link to comment Share on other sites More sharing options...
FranciscoR Posted April 20, 2009 Report Share Posted April 20, 2009 Basic problem is you're DL *.exe and telling 7z to process *.zip. '&&' is conditional, so it will not work. Link to comment Share on other sites More sharing options...
allanc Posted April 20, 2009 Author Report Share Posted April 20, 2009 Basic problem is you're DL *.exe and telling 7z to process *.zip. '&&' is conditional, so it will not work. The '&&' is conditional upon what and why? TIA. Link to comment Share on other sites More sharing options...
FranciscoR Posted April 20, 2009 Report Share Posted April 20, 2009 (edited) IF command #1 is sucessfull, command #2 is executed. Otherwise #2 is not executed. See here for instance. '&' executes #1 AND #2. P.S. To unpack 7-zip you need to use Uniextract. ------------------ Edit: 7-zip uses NSIS, so it should work. Edited April 22, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
allanc Posted April 21, 2009 Author Report Share Posted April 21, 2009 IF command #1 is sucessfull, command #2 is executed. Otherwise #2 is not executed. See here for instance. '&' executes #1 AND #2. P.S. To unpack 7-zip you need to use Uniextract. Changing the '&&' to '&' resolved the issue. Thank you for your assistance. Link to comment Share on other sites More sharing options...
andreone Posted April 21, 2009 Report Share Posted April 21, 2009 Why &&? You're not programming here. Simply put your two lines ... on two lines in the edit box Nope' date=' indeed with Ketarin you need to use symbols like & and && to combine commands. [/quote']I have this for an app and it works fine: each line is executed 7z x -y -o"{install_root}\{category}\{appname}" {file} del {install_root}\{category}\{appname}\languages\* /Q rmdir {install_root}\{category}\{appname}\languages So & or && are not mandatory Link to comment Share on other sites More sharing options...
FranciscoR Posted April 21, 2009 Report Share Posted April 21, 2009 Actually it did not used to work like that. And tutorial still says If you want to specify multiple commands, you can connect them with ”&&” like “copy {$file} … && del {file}”. Peanuts. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now