Sign in to follow this  
Followers 0
pendal

compressing files in loop

5 posts in this topic

I need to run this command

7za.exe a files.7z c:\files

but the dir c:\files is about 2 gigs in size so it takes about 10 minutes to compress.

how do I tell autoit to wait until the command is complete before continuing.

the 7za.exe command outputs the words "Everything is OK" to the cmd window when it is finished. Is there anyway to search for that string in the window?

Share this post


Link to post
Share on other sites



RunWait() ?

Jos

Here is what i have so far.

if DirGetSize($sPath &"\"& $array[$n] &"\"& $nFolder &"\Plates") > 1073741824 Then ;if the directory is larger than 999MB ... size must be in bytes.
        Run("cmd.exe")  
        WinWaitActive("C:\WINDOWS\system32\cmd.exe")
        send($compLocation & " a " & $sPath &"\"& $array[$n] &"\"& $nFolder &"\Plates.7z " & $sPath &"\"& $array[$n] &"\"& $nFolder &"\Plates\*{ENTER}", 0))    
        ;check to see if the archive is done compressing.
        
            ;need to know what goes here.
        
        ;close the cmd window.
        send("Exit{ENTER}",0)
        EndIF

If i am approaching this the wrong way .. please let me know.

Thanks in advance.

P

Share this post


Link to post
Share on other sites

I would use either RunWait() or ShellExecuteWait(). Just have a look at those in the Helpfile.

Jos

Thanks a million .. this software is the MAC-DADDY!!

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