Computing.Net > Forums > Programming > Batch File Commands (HELP PLZ!) # 2

Batch File Commands (HELP PLZ!) # 2

Reply to Message Icon

Original Message
Name: darkrain777
Date: January 3, 2008 at 09:58:25 Pacific
Subject: Batch File Commands (HELP PLZ!) # 2
OS: XP
CPU/Ram: 1 GB
Model/Manufacturer: Compaq
Comment:

Ok, I have another similar problem.
I have all these files in a folder with the same extension and I need a batch script that will go through one at a time, and upload each file to an ftp server and produce an error if it fails. Then move this uploaded file to an archive folder only if the upload was successful.

-----------------
I already have a script that will upload files to an ftp server.

ftplogin.bat (batch file):
ftp -n -s:notepadcode.txt www.user.com

code (in notepad):
user
user@user.com
password
cd /blah
put whatever.jpg
quit
----------------

Thanks anyone for help.



Report Offensive Message For Removal


Response Number 1
Name: darkrain777
Date: January 3, 2008 at 13:23:01 Pacific
Reply: (edit)

Thinking on this a little more... I see that I don't necessarily need to do this file by file, all of these files could be uploaded and then moved to the archive folder, but I don't know if you can upload multiple files at the same time and make sure they send an errorlevel message if they failed. A loop would probably be easier if it could be done. Also, I'm not sure how to do this such that if the file doesn't ftp then it doesn't move to the archive folder.

Thanks again.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Batch File Commands (HELP PLZ!) # 2

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge