Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows BAT file

Status
Not open for further replies.

blegit1980

Programmer
Nov 21, 2005
53
0
0
CA
Hi, I'm very new at .bat programming... Here's my situation. I want a batch program to access an ftp site to see if an updated version of a file is available. The filename cannot be changed so I thought of keeping the current version number of the file in another text file so that the program could use this number to compare with the file on the ftp site... Here's an example of what I mean : Lets say the filename to be updated is version. I cannot change the name of this file so in a textfile I would mention the number 1. Now when logging into the ftp site I would combine the filename (version) to the value of the textfile which is the number 1 in this case to get the filename (version1) I would then take this value to compare with the filename on the ftp site. If there is a difference between both I would download the file and rename it to version and update the textfile containing the version number...

I'm sorry for the long post. Does anybody have any ideas on to how I could do this? Code examples would be very nice since i'm new at this type of programming. Thank you

-Simon Cooke-Poirier
runninmg WIN2K
 
batch file programming is MS-DOS so you are limited in what
you can do and batch programming is limited too. For example
there's no way to read a file that i am aware of within a
batch file (unless you call another program). There are
MS-DoS basics with the ability to read the internet with
third-party libraries but again i would say it's probably
easier to do it in a windows programming environment.

PowerBasic Console or PowerBasic for windows could do this
quite easily I would think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top