Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

FTP Batch Files

Original Message
Name: Matt
Date: November 27, 2003 at 09:03:50 Pacific
Subject: FTP Batch Files
OS: Win XP
CPU/Ram: 1.6GHZ 256 RAM
Comment:
Is it possible to pass a parameter from one batch file to another whilst using the ftp command?

E.g.

Batch1.bat

ftp -i -s:C:\batch2.bat

Batch2.bat

open 199.000.011.99
username
password
quote site namefmt 1
cd /qdls
cd general/
del file1.txt

The batch files are working fine but I want to pass a parameter from batch1 to batch2. This parameter will then replace file1.txt so it will be deleted every time the batch is run. If you need more clarity or explanation, let me know. Thanks in advance.

Matt


Report Offensive Message For Removal


Response Number 1
Name: IVO
Date: November 27, 2003 at 14:10:39 Pacific
Subject: FTP Batch Files
Reply: (edit)
I am not very expert of the ftp command, but as far as I know what you define a batch script (Batch2.bat) is really a trxt file of ftp command to be interpreted by the ftp commands itself and NOT by the system processor Cmd.exe or Command.com (in fact it is a ftp script not a batch file and the extension is not relevant at all).

So stated you can work around following this trick:

Omitt from Batch2.bat the last line (Del File1.txt) and set Batch1.bat as below

Echo Del %1 >> Batch2.bat
ftp -i -s:C:\Batch2.bat
Type Batch2.bat | Find /V "Del" > Batch2.bak
Del Batch2.bat
Ren Batch2.bak *.bat

If so typing Batch1 File1.txt will result in performing what you want. Adjust the pathnames as required.

May be some other guy is smarter than I can.


Report Offensive Follow Up For Removal

Response Number 2
Name: IVO
Date: November 27, 2003 at 14:16:34 Pacific
Subject: FTP Batch Files
Reply: (edit)
Replace Del with del in Batch1.bat, as ftp commands are lowercase as standatd.

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: FTP Batch Files

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




acer 312T BIOS problem

K7 Turbo possible max fsb?

Pc anywher problem

WinFLP & OE/Outlook2003

Computer resets after a few minutes


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC