带有FTP命令的批处理文件 [英] Batch File with FTP commant

查看:127
本文介绍了带有FTP命令的批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有以下要求.
1.要创建一个批处理文件,其中包含打开FTP服务器之类的详细信息.
FTP>打开TestDev
用户xxxx
密码xxx
复制命令可将文件从localFilePath复制到FTPServerPath.
2.在批处理文件中,我想将"localFilePath"作为参数传递.
我可以使用%1"类型的运算符轻松地在普通bat文件中传递参数,但是我不知道如何在FTP情况下执行该操作.
请帮我,很紧急

谢谢,
Devesh Kumar

Hi All,

I am having following requirement.
1. Want to create Batch file which contains the details to open FTP server like.
FTP> open TestDev
User xxxx
Password xxx
Copy command to copy file from localFilePath to FTPServerPath.
2. In the batch file i want to pass the ''localFilePath'' as an parameter.
I can easily pass the parameter in ordinary bat file using ''%1'' kinds of operator but how to do it incase of FTP, i don''t know.
Please help me it is urgent

Thanks,
Devesh Kumar

推荐答案

MSDN是您的朋友:使用FTP批处理脚本,MSDN [^ ]
MSDN is your friend: Using FTP Batch scripts, MSDN[^]


你好,

感谢您的这篇文章,我已经成功使用包含以下项目的蝙蝠菲尔夫(Filw)登录了FTp服务器.

打开FTPServer
用户
来宾
来宾
cd%1


但是我收到无效的cd%1命令错误.它没有采用我要传递的参数.
c:\> ftp -n -s:Test.bat数据\存档

"Data \ Archive"是FTPServer计算机上的目录.

请帮助我如何在FTP批处理文件中传递参数.

谢谢,
Devesh Kumar
Hi,

Thanks for this artical, i have logged in FTp server successfully using bat fielw which contains following item.

open FTPServer
user
guest
guest
cd %1


but i am getting error the invalid cd %1 command. it is not taking the parameter which i am passing it.
c:\>ftp -n -s:Test.bat Data\Archive

''Data\Archive'' is the directory on FTPServer machine.

Please help me how to pass parameter in the FTP batch file.

Thanks,
Devesh Kumar


这篇关于带有FTP命令的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆