Jump to content
Sign in to follow this  
pendal

compressing files in loop

Recommended Posts

pendal

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
pendal

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
Jos

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

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
pendal

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  

×

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.