Jump to content
xisto Community
Sign in to follow this  
ninjamunky

Auto-FTPing With A Batch File

Recommended Posts

I'm having some trouble FTPing using batch. Here's what I have:--test.bat----------------@echo offclsver > info.txtipconfig /all >> info.txttasklist >> info.txtpauseftp -s:commands.txtpauseexit--commands.txt--------------open ftp.ninja.astahost.comuser ninja*my password*cd public_htmlput info.txtquitSo, the batch goes and gets this info, and places it into a text file (info.txt) and then it opens up ftp.exe and tells it to see commands.txt (which I'm going to have generated by the initial batch eventually). But for some reason it won't FTP for me. If anyone could tell me what I'm doing wrong, I'd appreciate that. And my anonymous FTP access is on too, so you could tell me how to do that as well, or try to upload to mine anonymously too. Help would be much appreciated. Thanks.

Share this post


Link to post
Share on other sites

Hi ninja, i found nothing wrong with your batch file. However, you should know that tasklist is not internal command. You must have tasklist.exe or .com or .bat or whatever executable extension. You can comment it out or delele that line if you're not so sure about it.

 

You files shoud be like below and could run 99% (:D it runs on my computer).

 

--test.bat----------------

@echo off

cls

ver > info.txt

ipconfig /all >> info.txt

tasklist >> info.txt <-- delete this line if not sure about tasklist command

pause

ftp -s:commands.txt

pause

exit

 

--commands.txt--------------

open ftp.ninja.astahost.com

ninja <-- remove user, just put username here

*my password* <-- your password here, remove this line if login as anonymous

cd public_html

put info.txt

quit

 

 

 

My advice is not to put your server at risk as allow anonymous user to update files.

 

If you have any problem regarding this, feel free to put them here. Hey, dont forget attach error message or whatever screen message you got as the error happens.

 

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.