Auto-FTPing With A Batch File

free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > Misc. Programming Languages

Auto-FTPing With A Batch File

ninjamunky
I'm having some trouble FTPing using batch. Here's what I have:

--test.bat----------------
@echo off
cls
ver > info.txt
ipconfig /all >> info.txt
tasklist >> info.txt
pause
ftp -s:commands.txt
pause
exit

--commands.txt--------------
open ftp.ninja.astahost.com
user ninja
*my password*
cd public_html
put info.txt
quit

So, 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.

Reply

dungsport
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% (tongue.gif 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

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. tasklist .bat - 45.65 hr back. (1)
  2. auto login bat ftp file - 46.75 hr back. (1)
  3. auto ftp batch file windows - 50.11 hr back. (1)
  4. cmd ftp user auto login - 52.02 hr back. (1)
  5. tasklist in batch file - 53.03 hr back. (1)
  6. batch file to auto ftp - 54.60 hr back. (1)
  7. auto logon ftp batch - 61.09 hr back. (1)
  8. pauses ftp bat - 64.12 hr back. (1)
  9. ftp how to pause - 71.05 hr back. (1)
  10. ftp pause bat from run - 72.19 hr back. (1)
  11. creating command text file thru batch file - 81.65 hr back. (1)
  12. auto ftp batch file in windows - 82.21 hr back. (1)
  13. ftp bat file with auto login - 87.94 hr back. (1)
  14. ftp batch file get auto - 103.07 hr back. (1)
Similar Topics

Keywords : auto, ftping, batch, file

  1. Why Does HTML File Saved Show As IE File?
    (4)
  2. Batch Shortcut Creation
    (2)
    I want to know how to create a shortcut and tell it where to put it. Like in the "Startup" folder
    /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /> Thanks.....

    1. Looking for auto, ftping, batch, file






*SIMILAR VIDEOS*
Searching Video's for auto, ftping, batch, file
advertisement




Auto-FTPing With A Batch File



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE