Jump to content

Recommended Posts

Posted

Hello my fellow scripters.

Im currently planning to make a small program that will automaticly upload all files in a specific folder to a FTP server. We are several people working at a computer hardware site and we just got oversevles a server. But to help the users to automaticly backup and store all the data on this server, I want to create a small script that uploads the files in a specific folder to our server (over FTP).

I havent been working to mutch on it yet but i already got problems. The _FTP_DirPutContents functions is perfect for my needs, since it basicly uploads all the files in a folder to a folder of my choise, on the FTP server. However everytime i run the script, it wants to uplad all the filres evertime. Witch means that it automaticly overwrites all the files on the server. Is there a good way to get around this or perhaps someway to make the funcion only overwrite the file if it has been modified?

A workaround I was thinking of is to perhaps scan all the files in the folder and store them with "last modified" data in a txtfile and then compare the textfile dates to the dates on the actual files. All the files that doesnt match should be uploded. I just think ist a kind of a crude solutiona nd should be able to be solved more easely. Any sugestions?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...