Diana (Cda) Posted July 5, 2004 Posted July 5, 2004 I just did an extensive search of the forums for various key words that might help in zipping up a folder's contents and saving to a target location. I also looked extensively through the help file and codes _are_ there, just not the environment that they're dealt with. Does anyone know of a location of various backup style of AI scripts so that I can study them and figure out how to use the syntax for my own needs? To give an overview, I need to zip up the contents of my journal program's data files: C:\Program Files\DIARY\Diary v2.2\DATA\*.* and save to this folder: D:\0- PROGRAMS\Diary v2.2\BACKUPS using this type of naming convention: Diary2.2 BKP- 2004.07.05.Mn.zip (i.e., putting in the current date. The example here is for today, only.) Thanks! Any help appreciated pointing me in the right direction. Cheers.
SlimShady Posted July 5, 2004 Posted July 5, 2004 I just did an extensive search of the forums for various key words that might help in zipping up a folder's contents and saving to a target location. I also looked extensively through the help file and codes _are_ there, just not the environment that they're dealt with. Does anyone know of a location of various backup style of AI scripts so that I can study them and figure out how to use the syntax for my own needs? To give an overview, I need to zip up the contents of my journal program's data files: C:\Program Files\DIARY\Diary v2.2\DATA\*.* and save to this folder: D:\0- PROGRAMS\Diary v2.2\BACKUPS using this type of naming convention: Diary2.2 BKP- 2004.07.05.Mn.zip (i.e., putting in the current date. The example here is for today, only.) Thanks! Any help appreciated pointing me in the right direction. Cheers.You can download a command line version of PowerArchiver on PowerArchiver.com. This is an example of how to zip files from "My Documents" to your desktop. RunWait(@ComSpec & ' /c PACOMP.EXE -a -r -p -c2 -w -q "' & @DesktopDir & '"\MyDocuments.zip "' & @MyDocumentsDir & '"\*.*')
blitzer99 Posted July 6, 2004 Posted July 6, 2004 The WinZip command line support add-in for WinZip will handle this requirement too. It's a free download for WinZip version 9 owners at this web site: http://www.winzip.com/downcl.htm. I have used it extensively and it works extremely well. It's fast too. The syntax for it's use is similar to that of PowerArchiver. Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3
Diana (Cda) Posted July 13, 2004 Author Posted July 13, 2004 Thanks for the replies, much appreciated. I use WinRAR and it has a command line RAR.EXE included in the installation, I've been able to determine. I HATE command line stuff, though <sigh>. Anyway, that part is my problem to figure out and Ive just spent a frustrating few sessions trying to do that <lol>. Anyway, one thing is certain, I'd prefer to use AI to a batch file approach to launch this. Has anyone seen an AI script that uses a command line archiving program approach? I could then substitute the WinRAR syntax (once I can get the darned bugs ironed out <g>) for the archive part. Thanks.
magicboy Posted July 14, 2004 Posted July 14, 2004 I am working the same sort of project. I cannot get rar.exe to work however. This is my code... RunWait(@ComSpec & " /c " & '"c:\program files\winrar\rar.exe" a "c:\_autoit scripts\backuputil\test.rar" "@c:\_autoit scripts\backuputil\rarfiles.lst"') If I open up a prompt and run "c:\program files\winrar\rar.exe" a "c:\_autoit scripts\backuputil\test.rar" "@c:\_autoit scripts\backuputil\rarfiles.lst" everything works fine. Anyone see a problem?
SlimShady Posted July 14, 2004 Posted July 14, 2004 I don't know, it looks good to me. Try this: RunWait(@ComSpec & ' /c "c:\program files\winrar\rar.exe" a "c:\_autoit scripts\backuputil\test.rar" "@c:\_autoit scripts\backuputil\rarfiles.lst"')
magicboy Posted July 14, 2004 Posted July 14, 2004 @SlimShady Thanks for the sugestion but that still did not get it to work. It exibits the same behavor as the way I originally posted. A cmd window opens and closes and nothing happens.
magicboy Posted July 14, 2004 Posted July 14, 2004 @All Thanks for all the help. I was playing around and found that the following code works RunWait('"c:\program files\winrar\rar.exe" a "c:\_autoit scripts\backuputil\test.rar" "@c:\_autoit scripts\backuputil\rarfiles.lst"') Thanks for all the help
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now