Avatar of joel011197
joel011197

asked on 

FTP batch processing and return code

My application needs to upload files on a remote server. I think FTP is the best way to do that and I'm writing the FTP batch (running on Windows 2000).

The basic scripting is ok (connexion and put command) but I cannot figure out how to know whether the command has been completed or not.

In fact my application need to upload a specific file to the remote host and DELETE it locally if the FTP was done correctly. If FTP failed, the local file should NOT be deleted and it will be uploaded in a fruther attempt.

What could I use in order to get the result (return code) of my FTP command (I'm using FTP -s:script.ftp)?
Thank you in advance for your help.
J. Zimmerli
Windows 2000

Avatar of undefined
Last Comment
joel011197
ASKER CERTIFIED SOLUTION
Avatar of WelkinMaze
WelkinMaze

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of la_pepe59
la_pepe59

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of joel011197
joel011197

ASKER

Both suggestions were ok but a little bit to complicated to implement. Furthermore, I need to get different error level if 1) login failed or 2) file upload failed.
So I installed easyphp on my box and the different ftp functions are exactely doing what I need.
Thank you for your help.
Windows 2000
Windows 2000

Windows 2000 is an operating system for use on both client and server computers. It is the successor to Windows NT 4.0, and is the last version of Microsoft Windows to display the "Windows NT" designation. Four editions of Windows 2000 were released (Professional, Server, Advanced Server, and Datacenter Server) that shared a core set of features, including many system utilities such as the Microsoft Management Console. All versions of the operating system support NTFS 3.0, Encrypting File System, as well as basic and dynamic disk storage. The Windows 2000 Server family includes support for Active Directory services, Distributed File System and fault-redundant storage volumes.

37K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo