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?
multiple file open, macro action, close
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 7
- Joined: Wed Mar 16, 2005 1:08 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
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]
[email protected]