Click here to Skip to main content
Click here to Skip to main content

Servex - using batch files for remote ftp

, 14 Apr 2004
Rate this:
Please Sign up or sign in to vote.
Remote Commands on a Computer

Introduction

This uses a batch file through an ftp site and communicates information through the site. The server file will loop and keep trying to execute a file on the ftp site the client will place that file on the site and the server will finally execute it after it really exists. In the Client you type the .bat file you wish to execute on the remote computer. You can make it send a response to check for a connection as shown below.

Using the code

Open dos and get into the directory the client is in, type the filename of the client then before you hit enter hit space and then the batch file you wish to execute on remote computer. After you have done that hit enter. I don't like doing it that way but I did that to make it compatible to Win95/98. For this to actually work the client must be opened first.

echo open>ftp.txt
echo servex.europe.webmatrixhosting.net>>ftp.txt
echo servex>>ftp.txt
echo password>>ftp.txt ("password is the password")
echo put respond.bat>>ftp.txt
echo bye>>ftp.txt
echo set resp=here>respond.bat
ftp -s:ftp.txt
delete ftp.txt
delete respond.bat

Points of Interest

I have always loved using ms-dos to create programs because you can do practically anything with them, if you put your mind to it. Well i spent about 10 minutes on the client/server program, and tested it, it seems to work just fine. I highly recommend batch programming and if you have any questions over any ms-dos stuff just let me know.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

David Q

United States United States
No Biography provided

Comments and Discussions

 
Generali want to make telnet throw batch file Pinmemberlamia803-Jun-08 2:29 
Generalhi want to connect to telnet server via batch Pinmembervishal3346-Sep-07 22:20 
GeneralCopy Files From My PC and FTP it into my telnet directory Using DOS Batch Program PinmemberAnAd21-Dec-04 14:10 
I am trying to create a batch file that copies a file located on my PC and FTP the file from my PC to my telnet directory. I am not to sure how to do this. Let me say that the file name is test.prn and it is located in my C:/Purge_Order directory. If I go into DOS and try to copy that file into the FTP location, of course you cannot do that. So, I need a way to copy that file into my telnet directory by FTP the file. Do you know a way I can copy the test.prn file into my telnet directory by FTP it using a DOS. I know I can manually copy the file into the FTP session in my telnet directory; however, I am working on a faster way for me to run a batch file so it does it automatically for me. Any idea?
GeneralRe: Copy Files From My PC and FTP it into my telnet directory Using DOS Batch Program Pinmemberlamia803-Jun-08 2:37 
Generalcheck if file exists in remote site through FTP PinmemberHemanth00718-May-04 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 15 Apr 2004
Article Copyright 2004 by David Q
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid