LittleZZ Veteran 442 Posts user info edit post |
Ok, I'm trying to write a script/program for my linux workstation at work to automatically download code updates for machines I am working on. The code updates are placed on an ftp server and right now i use lftp to get them. Basically I want the script/program to create a list of current code levels I have, check the ftp server for updates by comparing to the list, download the updated code and then updateing the list. I've done simple programs in C++ from the stand point of creating a file, parsing files, comparing entries, and updating the files, but I don't have any experience with scripting or programming with ftp. Anyone have suggestions of how to go about this? I'm looking at some stuff online but I figured I'd ask here as well in case someone had some experience with this. Thanks. Oh, and downloading freeware maybe an option but I'd have to run it by the boss man....they're pretty picky about what we put on our machines. Besides, I really don't have any actual work to do right now so writing the program would make my nights go by easier. 8/8/2005 6:58:44 PM |
dakota_man All American 26584 Posts user info edit post |
there have to be some examples online of almost exactly what you want to do 8/8/2005 6:59:51 PM |
LittleZZ Veteran 442 Posts user info edit post |
like i said in my message, I'm looking at stuff online as well. i just wanted to see if anyone here has had experience with it and had some suggestions about how to go about it. I'm sure there are several ways of doing this, but someone who has done it before may have some tips that would save me some time. Also, I'm doing this to learn and don't want to just go grab a program off the web that someone else has already written. 8/8/2005 7:38:51 PM |
Noen All American 31346 Posts user info edit post |
you need to get a book or two on C++ and *nix
Basically you just need to find a ftp source library (should be included with every distribution of linux out there), build your program around it, and compile baby.
Check sourceforge.net for similar projects. 8/9/2005 12:55:40 AM |
LittleZZ Veteran 442 Posts user info edit post |
Back again...I've found an ftp library to use with java and have gotten the basics of the program down. Eventually I want to set up a nice GUI to simplify things, but right now i'm just testing my functions and running it through a basic command line interface. I've got it where as you download a file it outputs the number of Bytes downloaded, but i can't figure out how to make it output the info in the same place on a line like a counter. I don't think that this will be necessary in the final version, but it would help streamline my output as i test things because right now each time a packet is sent, i get a read out on another line and all the lines add up quick. I believe this was done setting the width of an output stream in C++, but I can't find a comperable function to use in Java. Any ideas? And yes, I've looked around with Google
[Edited on August 25, 2005 at 5:21 PM. Reason : ho hum] 8/25/2005 5:18:13 PM |