473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to find failure file (name of file) in ftp file transfer process in batch file

Hi ,
i hava one ftp script in batch file programming ,
ftp script is working fine..
but my is i dont know how much files and what are files avaiulable in remote folder ,,,,
if any errors or failures occurring in ftp process how to trace failure files...

everything in batch file script only...
this is my ftp script ...

@ echo off
open xxxxxxxxx
user username pwd
cd /str1/Test/issue-----------remote server location folder
ls
lcd C:\Tiff\files ---------------------local system folder
pwd
binary
mget *. -------------------unknown multiple files
mget *.------------------- unknown multiple files
mget *. ----------------------unknown multiple files
bye

and this is my failure files script

@echo off
SET STATUS_FILE=C:\new\tiff\new.txt
SET SUCCESS_STATUS=200
SET FAILURE_STATUS=0
:Clear the existing Status file ***
IF EXIST %STATUS_FILE% DEL %STATUS_FILE%
:Try to ftp the file and log the success of the transfer ***
ftp -n -i -s:C:\new\tiff\ftpopen.txt >> %STATUS_FILE%

:Check the success of the transfer ***
FINDSTR /C:"200 PORT command successful." %STATUS_FILE%
::FINDSTR /C:"266 Transfer complete" %STATUS_FILE%

IF %ERRORLEVEL%==1 SET RETURN_CODE=%FAILURE_STATUS%
IF %ERRORLEVEL%==0 SET RETURN_CODE=%SUCCESS_STATUS%
:Exit with the correct exit code.
echo %RETURN_CODE% >>%STATUS_FILE%
EXIT %RETURN_CODE% >>%STATUS_FILE%
if i run script i getting only results of files tranfers . iwant know filenames only
i hope i will get good solution from u people

thanks & regards

vasikaran
Jan 22 '08 #1
0 1672

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dan Jones | last post by:
I'm writing a script to process a directory tree of images.  In each directory, I need to process each image and generate an HTML file listing all of the images and links to the subdirectories....
21
by: ryanmhuc | last post by:
I know the subject might be confusing. I am no beginner with javascript but I haven't been able to figure out how to get the javascript file name from code inside the file. So you have an HTML...
3
by: SI | last post by:
I need to transfer a file from a central computer(Windows XP) to multiple 'branch' computers(WindowsNT/Windows2000) on a weekly basis. This transfer should be done programmatically in C#, when a user...
1
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try...
0
by: Marty Cruise | last post by:
I successfully deploy my application to 20 domain users. Only one new user is giving me a problem, although he can access all domain resources. When he clicks the installation link on the...
0
by: Elroyskimms | last post by:
I need to execute a batch file via ASP.Net. In my VB.Net code, I'm using System.Diagnostics.Process to call the batch file and its appropriate command line arguments. I'm using...
15
by: batman | last post by:
i have a text file that is like: date = OCT0606 asdf sdaf asdfasdgsdgh asdfsdfasdg START-OF-DATA asdfasdfg asdfgdfgsfg
0
by: elegipcio | last post by:
Hello everyone i'm new to asp.net i'm looking to How to get values (Variables) pre Declared in web form & pass it to a batch file. coz i've to get this values to be added to the batch file to...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.