Sign in to follow this  
Followers 0
penggilas2

help me again.. For 7zip..

9 posts in this topic

I hope all master will help me again.. :evil:

this is command in bat file..

@echo off

C:\7z.exe x -o%temp%\ghost -y M:\coba\file.7z

-o%temp% is set Output directory extract file... -y: assume Yes on all queries M:\file\ghost.7z is my 7zip folder

How to convert in auto it script.. I create script like this

DirCreate(@TempDir & "\ghost")

$tempdir = @TempDir & "\ghost"

Run("7z.exe x -0" & Chr (34) & $tempdir & Chr (34) & "-y M:\file\ghost.7z") but not working..

99ojo, M23, and all master plz help me again.. ;)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

try:

DirCreate(@TempDir & "\ghost") 
$tempdir = @TempDir & "\ghost"
;changes: -o and added one blank before -y
$cmd = "7z.exe x -o" & Chr (34) & $tempdir & Chr (34) & " -y M:\file\ghost.7z"
Run($cmd)
;maybe:
;Run (@ComSpec & " /c " & $cmd)

;-))

Stefan

P.S: You should debug with generating commandstring and control it via MsgBox instead of Run. So you can see errors much better.

Edited by 99ojo

Share this post


Link to post
Share on other sites

Hi,

try:

DirCreate(@TempDir & "\ghost") 
$tempdir = @TempDir & "\ghost"
;changes: -o and added one blank before -y
$cmd = "7z.exe x -o" & Chr (34) & $tempdir & Chr (34) & " -y M:\file\ghost.7z"
Run($cmd)
;maybe:
;Run (@ComSpec & " /c " & $cmd)

;-))

Stefan

P.S: You should debug with generating commandstring and control it via MsgBox instead of Run. So you can see errors much better.

I try script.. But I can`t see error list..

P.S: You should debug with generating commandstring and control it via MsgBox instead of Run. So you can see errors much better. ;)

Ok I will try to make it.. but if ojo want to give me an example again.. to control msgbox I'll be very happy :evil:

Share this post


Link to post
Share on other sites

I try script.. But I can`t see error list..

P.S: You should debug with generating commandstring and control it via MsgBox instead of Run. So you can see errors much better. ;)

Ok I will try to make it.. but if ojo want to give me an example again.. to control msgbox I'll be very happy :evil:

Hi,

i didn't meant program execution errors, but string generating error.

What i meant:

DirCreate(@TempDir & "\ghost") 
$tempdir = @TempDir & "\ghost"
;changes: -o and added one blank before -y
$cmd = "7z.exe x -o" & Chr (34) & $tempdir & Chr (34) & " -y M:\file\ghost.7z"
MsgBox (0,"",$cmd) ; so you would have seen the missing blank before -y
;Run($cmd)
;maybe:
;Run (@ComSpec & " /c " & $cmd)

By the way, your problem is solved or not.

If not:

1) Did you try the run with @comspec options?

2) You may need full path to 7zip.exe

;-))

Stefan

Share this post


Link to post
Share on other sites

Hi,

i didn't meant program execution errors, but string generating error.

What i meant:

DirCreate(@TempDir & "\ghost") 
$tempdir = @TempDir & "\ghost"
;changes: -o and added one blank before -y
$cmd = "7z.exe x -o" & Chr (34) & $tempdir & Chr (34) & " -y M:\file\ghost.7z"
MsgBox (0,"",$cmd) ; so you would have seen the missing blank before -y
;Run($cmd)
;maybe:
;Run (@ComSpec & " /c " & $cmd)

By the way, your problem is solved or not.

If not:

1) Did you try the run with @comspec options?

2) You may need full path to 7zip.exe

;-))

Stefan

I have tried all the alternatives,..

Run (@ComSpec & " /c " & $cmd)

and

Run($cmd)

But still error

and this is msgbox list..

7z.exe x -o"C:\users\myname\appdata\temp\ghost"-y M:\file\ghost.7z

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hi,

Chr (34) -> "

Btw, in your MsgBox output is still missing a blank, maybe paste and copy error.

Have you try full path to 7zip.exe?

Have you try to add a working directory?

;-))

Stefan

As i see path c:\users: Try #RequireAdmin in your script

Edited by 99ojo

Share this post


Link to post
Share on other sites

Hi,

Chr (34) -> "

Btw, your MsgBox output is still missing a blank, maybe paste and copy error.

Have you try full path to 7zip.exe?

Have you try to add a working directory?

;-))

Stefan

As i see path c:\users: Try #RequireAdmin in your script

I have add X command

x: eXtract files with full paths

and have try in bat file.. Ok and success

Share this post


Link to post
Share on other sites

so -y and M:\file\ghost.7z must be separated..

What does that mean?

;-))

Stefan

Share this post


Link to post
Share on other sites

Ok stefan I`m sorry.. U`r script Is Ok.. I Have write in wrong folder name.. I`m sorry..

U are the best.. Thank`s.. I`m sorry give U a trouble.. ;):evil::evil:

Share this post


Link to post
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
Sign in to follow this  
Followers 0