Click here to Skip to main content
Click here to Skip to main content
Go to top

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

 
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
Web04 | 2.8.140922.1 | Last Updated 15 Apr 2004
Article Copyright 2004 by David Q
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid