Jump to content
Sign in to follow this  

open/process files from directory

Recommended Posts



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



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]", "")


; here I will need to open file the folder




;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

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

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.