首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

windows FTP 命令行,是否能够将上传的路径作为一个参数传递给执行命令呢,该怎么解决

2012-02-09 
windows FTP 命令行,是否能够将上传的路径作为一个参数传递给执行命令呢---opftp.batftp-s:test.txt---tes

windows FTP 命令行,是否能够将上传的路径作为一个参数传递给执行命令呢
---opftp.bat
ftp   -s:test.txt

---test.txt
open218.206.93.226
0179upload
aye63h
bin
mkdir     floder1
mput   C:\f\*.bmp
y
y
bye

如上;
因为   floder1   ,   C:\f\*.bmp
这两个地方都可能发生变化,哪位兄弟知道,怎么能从外部将这两个信息动态的
变化呢;

还是根本不支持;只能够写程序动态变化;

谢谢!

[解决办法]
用echo 动态写test.txt 吧
[解决办法]
连长正解,在opftp.bat中用echo命令动态生成test.txt

@echo off
echo Please input your target folder name:
set /p TarDir=
echo Please input your files:
set /p TarFile=
echo open218.206.93.226> test.txt
echo 0179upload> > test.txt
echo aye63h> > test.txt
echo bin> > test.txt
echo mkdir %TarDir%> > test.txt
echo mput %TarFile%> > test.txt
echo y> > test.txt
echo y> > test.txt
echo bye> > test.txt
rem ftp -s:test.txt
[解决办法]
@echo off
echo Please input your target folder name:
set /p TarDir=
echo Please input your files:
set /p TarFile=
echo open218.206.93.226> test.txt
echo 0179upload> > test.txt
echo aye63h> > test.txt
echo bin> > test.txt
echo mkdir %TarDir%> > test.txt
echo mput %TarFile%> > test.txt
echo y> > test.txt
echo y> > test.txt
echo bye> > test.txt
ftp -s:test.txt

热点排行