multiple file open, macro action, close

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
rroach1991
Newbie
Posts: 7
Joined: Wed Mar 16, 2005 1:08 am

multiple file open, macro action, close

Post by rroach1991 » Wed Mar 16, 2005 1:10 am

I have a macro that works great on a file. Now I would like it to cycle through all files in a folder, open the file, execute existing macro code, close the file, then open the next one.

Any suggestions on where to start?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Mar 16, 2005 8:20 am

Use the GetFileList command. Look at the example for the GetFileList command in the help file:

GetFileList>c:\somefolder\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%

Let>k=0
Repeat>k
Let>k=k+1
//file_names_%k% is the file
//Your code here, or call your macro with file_names_%k% as a parm
Until>k,file_names_count
MJT Net Support
[email protected]

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts