Newbie help - batch processing

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
iainvw
Newbie
Posts: 6
Joined: Fri Jan 31, 2003 2:39 pm
Location: North East Scotland

Newbie help - batch processing

Post by iainvw » Fri Jan 31, 2003 2:51 pm

Hello,

I'm trying to use Macro Scheduler to automate processing of a series of files. I've been able to put together a script that handles the processing, but I'm confused about how to

1) Input the paths of a number of files (say, 6) as a list;

2) Get MS to process all of the files in sequence.

As I said, my script automates the processing of one file without problems. It's the multiple files bit I can't do. I'm sure the procedure would involve an array, but I'm not clear on how to use these in Macro Scheduler.

I'd appreciate any help offered by the experienced people on this list.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jan 31, 2003 6:31 pm

Have you tried the examples in the Help for GetFile> and Repeat> ?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

iainvw
Newbie
Posts: 6
Joined: Fri Jan 31, 2003 2:39 pm
Location: North East Scotland

Post by iainvw » Fri Jan 31, 2003 6:48 pm

bob hansen wrote:Have you tried the examples in the Help for GetFile> and Repeat> ?
Hi Bob,

Thanks for your reply.

I can't find a 'GetFile' - only a 'GetFileList' and an 'FTPGetFile' in either the online help or the pdf document.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jan 31, 2003 10:23 pm

Sorry, but you found it.....look at GetFileList> samples, it also includes the Repeat> command.

Use the Repeat> / Unitl> approach with almost all other commands. Could be CopyFile>, DeleteFile, etc.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

iainvw
Newbie
Posts: 6
Joined: Fri Jan 31, 2003 2:39 pm
Location: North East Scotland

Post by iainvw » Sat Feb 01, 2003 8:47 am

bob hansen wrote:Sorry, but you found it.....look at GetFileList> samples, it also includes the Repeat> command.

Use the Repeat> / Unitl> approach with almost all other commands. Could be CopyFile>, DeleteFile, etc.
As far as I can tell, GetFileList> deals only with a set of files which are already in the same directory. What I'd like to be able to do is select files from different locations using Input>, Browse, then get my script to process them all individually in sequence.

Lumumba

Post by Lumumba » Sat Feb 01, 2003 1:50 pm

Code: Select all

Let>lc=0

Label>Request
Input>Res,Please select file to copy ...
If>Res=,Ask
WLN>C:\Paths.txt,Result,%Res%
Label>Ask
Ask>Another file?,Answer
If>Answer=YES,Request

Label>Copier
Add>lc,1
ReadLN>C:\Paths.txt,%lc%,FileToCopy
If>FileToCopy=##EOF##,End
Message>Copy file now:%CRLF%%FileToCopy%
Wait>1.5
Run Program>cmd /c copy %FileToCopy%
Goto>Copier

Label>End
Del>C:\Paths.txt
I had also a try with:
Let>sep=;
ConCat>Paths,%sep%%Res%
to create a single string variable: C:\test1;C:\test2;C:\test3
which could have been splitted afterwards ...

iainvw
Newbie
Posts: 6
Joined: Fri Jan 31, 2003 2:39 pm
Location: North East Scotland

Post by iainvw » Sat Feb 01, 2003 11:18 pm

Lumumba,

That's just what I was looking for. I've made some modifications to your code to suit what I'm doing, and it works exactly as I'd hoped. Thank you. It's obvious - now that someone else has shown me!

Note to anyone else who cuts and pastes the code: remove spaces at the end of each line. That had me confused for a while.

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