为什么照这样写后: open 访问电脑的ip
user
用户名
密码
get 文件名
quit
再编写一个 getfile.bat 文件,包含如下内容:
ftp -s:test.scr
执行了那个getfile.bat后 能够在目标上创建文件,当大小为0k? 这个是为什么?如果在cmd环境下照着输入上面的 则又能完整下载文件
user
用户名
密码
get 文件名
quit
再编写一个 getfile.bat 文件,包含如下内容:
ftp -s:test.scr
执行了那个getfile.bat后 能够在目标上创建文件,当大小为0k? 这个是为什么?如果在cmd环境下照着输入上面的 则又能完整下载文件
解决方案 »
- 这个问题我不会描述,和按键精灵差不多吧
- 求一:Entity Framework object 对象转换为json 对象的好方法
- 怎么分析这个错误了?
- 二进制读取四个字节 怎么换位呢?
- 请大家帮下忙,谢谢!
- 新手问一个VS2008 使用面板上的一个小小问题!
- 如何防止进程被结束?
- 有关使用DataView保持窗口显示同步
- 请教大家。。。。。。。。。。初学者请教
- AndrewT(河马)来拿分!!急SOS!SOS!SOS!!希望2天内能有人回答!!有谁知道如何用c#分割文件??如果解决了300分相送!!!
- DataSet绑定TextBox以后,修改了TextBox的Text值以后,提交回数据库时的一个问题。
- 在WEB页面上将excel 导入sql数据库时出错。
你在cmd下运行bat呢,看看有什么提示
user a a
bin
hash
mget 1.rar c:\1.rar
quit
open ip port(如果需要)
user
password
get filename
quit
这样写对吗? 和我的感觉一样,你的写法不对,至少不能这么写。
因为在open之后,后面的语句不是纯粹的command了。
Process process = new Process();
在winform中用process.filename = @"c:\getfile.bat"
process.start() 为什么执行后没有效果?
ion1\bin\Debug>ftp -s: test.scrTransfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host] -v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.Notes:
- mget and mput comm
再加个process.StartInfo.Arguments="-s:test.scr";
Process p = new Process(); p.StartInfo.FileName = @"c:\getfile.bat";
p.Start();
会弹出一个cmd的窗体 当显示的内容是C:\Documents and Settings\Administrator\桌面\WindowsApplication1\WindowsApplicat
ion1\bin\Debug>ftp -s: test.scrTransfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host] -v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.Notes:
- mget and mput comm
p.StartInfo.Arguments = "-s:test.scr";
p.Start();??不行 - -|||
-s: test.scr
ftp -s:c:\test.scr怎么给分??
Process p = new Process(); p.StartInfo.FileName = "ftp";
p.StartInfo.Arguments = "-s:test.scr";
p.Start();??不行 - -|||
???我试下来可以的啊
你是怎么个不行?