中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-03 19:23
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Automatic file upload? [fixed] Thanks, everyone!
Printable Version  886 / 8
Floor1 3391617 Posted 2007-03-18 06:54
初级用户 Posts 56 Credits 116
For example, I want to upload my web page file d:/1.htm to my own site, so I can update the website!
Usually I have to log in to the site manually, enter the username/password, and then upload d:/1.htm to overwrite the original file!
That's really troublesome, having to log in and upload it manually every time. Can batch file do this?
Please give me some pointers, experts. Thanks in advance!

[ Last edited by 3391617 on 2007-3-18 at 03:03 PM ]
Floor2 xycoordinate Posted 2007-03-18 09:10
中级用户 Posts 228 Credits 493 From 安徽
Try using FTP
See if it works?
Floor3 3391617 Posted 2007-03-18 09:47
初级用户 Posts 56 Credits 116
I just tried it. ik8's ftp upload doesn't work, but some others do support uploading. The key question now is whether batch file can do it or not?
Floor4 yishanju Posted 2007-03-18 12:35
银牌会员 Posts 1,357 Credits 1,488
If FTP upload isn't supported, it may be possible
If FTP is supported, then it should be possible

[ Last edited by yishanju on 2007-3-18 at 12:36 PM ]
Floor5 yishanju Posted 2007-03-18 12:38
银牌会员 Posts 1,357 Credits 1,488
Floor6 3391617 Posted 2007-03-18 21:56
初级用户 Posts 56 Credits 116
Thanks a lot, I'll go try it!
Floor7 qingfushuan Posted 2007-03-18 22:49
高级用户 Posts 327 Credits 502
I used this before, give it a try
@echo off
echo open ftp的ip >%temp%\put.txt
echo ftp的用户名 >>%temp%\put.txt
echo 密码 >>%temp%\put.txt
echo get 路径\文件 >>%temp%\put.txt
echo by >>%temp%\put.txt
::Use vbs below to delay 10 seconds
echo Wscript.Sleep Wscript.Arguments(0) * 1000 >%temp%\delay.vbs
start ftp.exe -s:%temp%\put.txt
start /w %temp%\delay.vbs 15
del %temp%\put.txt
del %temp%\delay.vbs
del get-r.bat
Floor8 3391617 Posted 2007-03-19 03:29
初级用户 Posts 56 Credits 116
I've been trying this the whole time, it's worn me out!
Now I finally figured it out, thank you!

[ Last edited by 3391617 on 2007-3-18 at 02:59 PM ]
Floor9 qingfushuan Posted 2007-03-19 03:56
高级用户 Posts 327 Credits 502
Why not just try it yourself and find out,

Pre-chewed food doesn't taste good
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023