Jump to content
Ketarin forum

Cannot Use Multiple Command Successfully


allanc
 Share

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.