Login | |
|
 |
Re: Error handling FTP automation - 1/6/2005 9:27:40 PM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
Well, actually, the script there does almost exactly the same as mine. As extra it echoes the contents of the file being transferred, but that's not really what I need. I should find a way to catch errors during FTP transfers or to log each FTP step and loop through the log file entries afterwards scanning for errors (or something like that...) Thanks anyway for providing the link. I hope someone can help me in my search for a solution
|
|
| |
|
|
|
 |
Re: Error handling FTP automation - 1/9/2005 7:04:35 PM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
I'm sorry tnoonan, but that will only trap errors during the creation and filling of the file. It's not until the objShell.run that these FTP commands are executed. It is during this process, I would like to catch/monitor errors. I think drbelden's suggestion about piping the output to a file would be an acceptable solution...if I can get it to work...
|
|
| |
|
|
|
 |
Re: Error handling FTP automation - 1/26/2005 12:33:41 AM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
Thanks token and dgrigsby! Altough I still have to iterate through the output to find the errors, it is an acceptable solution. Thanks again, I consider this topic as closed.
|
|
| |
|
|
|
 |
Re: Error handling FTP automation - 3/29/2005 1:57:03 AM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
Hey buffi, The file "C:\Instructions.ftp" is first created with the following statement "objFso.CreateTextFile(strInstructions, True)" Then it gets filled with the instructions I wanted to do in FTP. Each ".WriteLine" statement adds a line to this file, in the order you would enter them when doing FTP from a command line. In other words, instead of typing each command manualy on a command line FTP, I write them first to a file and then let the command FTP gets his instructions line by line from this file (on a command line type "ftp -?" and check the -s flag) The "lcd" FTP command changes the local working directory The "cd" FTP command changes the remote working directory If I understand your situation correctly, you should use the "lcd" command to tell the FTP server where to get the file, and you can leave the "cd" command out, since you want the file to get uploaded to the route. Note: Alternatively you can leave both "lcd" and "cd" statements out and make sure your "put" (or "get") command includes complete paths to the files HTH
|
|
| |
|
|
|
 |
Re: Error handling FTP automation - 3/29/2005 10:40:00 PM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
You can give a file being transfered with FTP any name you want. Like this: Put <local path>\OriginalFile.ext <remote path>\NewName.ext The file "OriginalFile.ext" will be transfered to the remote path with the name "NewName.ext" In order to add the current date to the file name, you'll have to format the return value of the Now() function or the Date() function and concatenate it (with &) to the filename. In this topic I show a function I use to format the result of the Now() function. Post the relevant part of your code if you need more specific help. HTH
|
|
| |
|
|
|
|
|