Coffinated
asked on
upload files via ftp and remove
I need to create a script that will upload files from W2k machine using ftp to another w2k8 r2 server running IIS. There are several TXT files that need to be uploaded and moved to another directory upon successful upload.
I have a batch script that will upload all *.TXT files via ftp and move all TXT files to another location after the 1st script finishes. What the script is missing is ability to distinguish if a file was successfully moved.
Appreciate any help
I have a batch script that will upload all *.TXT files via ftp and move all TXT files to another location after the 1st script finishes. What the script is missing is ability to distinguish if a file was successfully moved.
open 300.300.300.300
user
WebOrders
Password1
prompt
mput D:\Orders\*.TXT
quit
move D:\Orders\*.TXT D:\Uploaded
Appreciate any help
also, I think you can combine the two scripts into one like this:
open 300.300.300.300
user
WebOrders
Password1
prompt
mput D:\Orders\*.TXT
!move D:\Orders\*.TXT D:\Uploaded
quit
right after the !Move command (Line #7) in above script by KnightKnight, You might consider adding a
!dir *.txt | find /i ".txt" && echo some files upload failed..
It will search for .txt files and if it finds any one of them ,will assume the upload failed..
!dir *.txt | find /i ".txt" && echo some files upload failed..
It will search for .txt files and if it finds any one of them ,will assume the upload failed..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
By this do you mean moved to the other server by FTP, or moved to the other folder on the same server by the move command?