473,749 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

2 New Member
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.tx t
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\f tpopen.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=%FA ILURE_STATUS%
IF %ERRORLEVEL%==0 SET RETURN_CODE=%SU CCESS_STATUS%
:Exit with the correct exit code.
echo %RETURN_CODE% >>%STATUS_FIL E%
EXIT %RETURN_CODE% >>%STATUS_FIL E%
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 1702

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

Similar topics

1
7595
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. Just about every source I can find on the 'net for processing subdirectories points you at Find::Find.  However, I'm trying to do something like this: enter directory open INDEX, ".\index.html" print INDEX HTMLheader
21
18245
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 doc with script tag who's source is a javascript file. <HTML> <script src="javascript.js"></script> </HTML> Javascript.js
3
3184
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 clicks a button or a menu item. After the transfer, we need to run a Script/batch file on each client computers. The problem is none of these computers are connected to the internet, but they have modems and can connect to telephone lines. We...
1
5795
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 to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
0
2658
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 publish page, Framework 2.0 installs successfully, but then the application installation fails during the "Verifying Application Requirements" process. Can anyone help me figure out how to solve this? Error is as follows. PLATFORM VERSION INFO...
0
2282
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 System.Diagnostics.Process.StandardError and System.Diagnostics.Process.StandardOutput to capture and view the output and error messages. My web.config file has the following: <identity impersonate="true" userName="administrator" password="password" />
15
9929
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
1039
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 Automate the process of creating records & Zones in our DNS server -------------------------- So, as a simple example i'll suppose to create a new folder on drive C:\ the name of this folder will come from the asp.net web form. i searched & get...
14
12827
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 case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute the batch file and get all the Standard output at the end, but i don't know who can i read it line by...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8256
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.