Jump to content

Zipping without a right hand click?


Recommended Posts

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

As the manual says B)

--------------- 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 ).

Link to comment
Share on other sites

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

Direct 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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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...