locutus243 Posted October 26, 2005 Posted October 26, 2005 Hi guys, I have a folder which contains six files. One of them is uk.mdb. I want to create a zip file from this uk.mdb Manually I would have to select the file and then right click on it and select IZArc, add to archive file. But I can't replicate this process with autoIT because I will never know where to click as the file could be in various different places in the folder so my mouse co-ordinates will always be out. I think it might be possible to pin the file down using FileFindNextFile function but from there I'm not sure how to turn it into a .zip file. Any help would be greatly appreciated. Thanks Mark
herewasplato Posted October 26, 2005 Posted October 26, 2005 IZArc claims to support command line operations. I do not have IZArc, so I can only assume that the command line switches allow you to everything that the GUI does; since, according to the IZArc website, IZArc is the most complete archive utility available today. :-) Combine that with AutoIt3s Run or RunWait. [size="1"][font="Arial"].[u].[/u][/font][/size]
dabus Posted October 26, 2005 Posted October 26, 2005 As the manual says --------------- snip Adding files to an archive with options: (This will open the Add Dialog box when you can select many options) · IZArc -a FileName1.ext (;FileName4.ext;FileName3.ext ..) For example: IZArc -a C:\Work\Doc.txt (or C:\Work\*.txt) --------------- snip Have a look at controlclick/command ... to see how the window can be controled ( seems ok to me ).
MHz Posted October 26, 2005 Posted October 26, 2005 I have a folder which contains six files. One of them is uk.mdb. I want to create a zip file from this uk.mdbDirect Adding files to an archives: (This will create directly a Zip archive and will add the file(s) to it) · IZArc -ad FileName1.ext (;FileName4.ext;FileName3.ext ..) For example: IZArc -ad C:\Work\Doc.txt (or C:\Work\*.txt)I believe this is what you want. No automation should be needed.
locutus243 Posted October 26, 2005 Author Posted October 26, 2005 I looked at the IZArc help to investigate this command line idea and although it says that IZArc supports such commands I'm not convinced. I tried typing into Dos (IZArc -a C:\drwtsn32.log) but it didn't manage to Zip the file. Perhaps it is the command I am using?? Maybe someone could help?? Similarly, once I am using the right command, would it be the _rundos function I need to use to incorporate it into an auotit script?? Thanks Mark
MHz Posted October 26, 2005 Posted October 26, 2005 This works for me $file = @ScriptDir & '\uk.mdb' RunWait(@ProgramFilesDir & '\izarc\izarc.exe -ad "' & $file & '"', '', @SW_HIDE)
locutus243 Posted October 26, 2005 Author Posted October 26, 2005 Thanx MHz that seems to work pretty well. You've solved a long problem for me, much appreciated. Mark
locutus243 Posted October 27, 2005 Author Posted October 27, 2005 Hey MHz, Although I tested the file yesterday and it created the zip file as desired. When I tried to open the zip file this morning IZArc complains, claiming a bad zip header was found. Im using the same example you presented me (with different filenames & extensions obviously), I wondered if you had ever come across this problem with IZArc ??? Thanks Mark
MHz Posted October 27, 2005 Posted October 27, 2005 Have tested a few more times and it tests ok. You should be able to just use it without the last 2 parameters of workingdir and window state as it does little. If you try to do more then 1 file then workingdir may have to be used. Give it another try or even try a reinstall of IZArc incase of a problem with your installation.
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