Jump to content
Sign in to follow this  
baqs

open/process files from directory

Recommended Posts

baqs

Hi,

I have quite a lot of old Lotus files (*.wk3) which I would like to convert to Excel (*.xls)

I can open this files in Excel and just save it in xls file format - easy.

because I have hundreds of wk3 files it will take ages to do it manually.

for Autoit it will be few steps only:

open file

save it

close it

open next file

etc.

but

I able to write the script for single file but how do I process whole folder - open first file, close then open next etc?

that's my script:

Run("C:\Program Files\Microsoft Office\OFFICE11\excel.exe")

WinWaitActive("[CLASS:XLMAIN]", "")

Send("^o")

; here I will need to open file the folder

Send("!f")

send("a")

Send("^s")

;close saved file

;and go back to opening next File

any suggestions much welcome

thank you

Share this post


Link to post
Share on other sites
Kerros

Another way would be to use _FileListToArray and a for loop.

I would also suggest using the Excel UDF instead of sending keystrokes. The Excel UDF that most people use is located here.


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites
baqs

thank you very much it works perfectly!!

now I will need to study a bit to understand how....

thanks again!

:-)

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.