Beginners scenario help required

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
icwicks
Newbie
Posts: 7
Joined: Wed Apr 23, 2003 11:28 am

Beginners scenario help required

Post by icwicks » Mon Apr 28, 2003 1:03 pm

Hi I need help with the following scenario.
I have a database system which spits out a file every hour. The filename will be different each time (eg file001.xtn, file002.xtn, file003.xtn)
I need to be able to get Macro Scheduler to delete files in folder1 then pick up the new file and place it into folder1 and FTP it to a holding folder on a remote pc. Also I then need Macro Scheduler to look for and Pick up a similar file from the remote in another folder and then delete that file.

I am new to Macro Scheduler and don't know how to write vb scripts...yet!

I hope this makes sense

Many Thanks in advance :roll:

Lumumba

Post by Lumumba » Fri May 09, 2003 1:41 pm

Also I then need Macro Scheduler to look for and Pick up a similar file from the remote in another folder and then delete that file. :?

What I've understand:
a) you check for a similar file on the remote pc
b) you copy/get it to the local pc
c) you want to delete it on the remote pc

Code: Select all

Let>UploadDir=c:\Upload
Let>TempDir=c:\Temp
Let>DownloadDir=c:\Download

DeleteFile>%UploadDir%\*.*

MoveFile>%UploadDir%\file001.xtn,%TempDir%\file001.xtn

FTPPutFile>ftp.domain.com,anonymous,[email protected],21,%UploadDir%\file001.xtn,/pub/file001.xtn,A

FTPGetFile>ftp.domain.com,anonymous,[email protected],21,%DownloadDir%\TheSimilarFile.txt,/pub/TheSimilarFile.txt,A
To do advanced file handling on the remote pc you should have a look at the syntax of the ftp command which comes with DOS (there are several threads regarding this in this forum. Search for "ftp")

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