Jump to content

open/process files from directory


baqs
 Share

Recommended Posts

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

Link to comment
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.

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