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
Beginners scenario help required
Moderators: Dorian (MJT support), JRL
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
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")
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