Jump to content

compressing files in loop


Recommended Posts

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?

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...