Hi,

Yes, ftp does not support setting time on remote files, which makes
synchronization somewhat difficult.

AFAIK you cannot set local file modification time from REBOL either.

Quote from the Windows Commander help:


Synchronize dirs and FTP servers


1. Purpose

This function can be used to keep an Internet Server like a personal
homepage up to date. The pages are edited on the local machine, and only
the modified pages are uploaded. You need to take special care to make
this work correctly! Therefore please read the following very carefully:

2. The problem with file date/times and FTP

Normally when you copy a file from one local directory to another, it
keeps its 'last modified' date and time. However, when you upload to an
FTP server, there is no function available to tell the server what the
date/time of the file is! Therefore, the file will always get the
current local time on the FTP server! This is a problem, because even
after the upload, the local and remote directory will be different!

3. How this is solved in Windows Commander

The synchronize function sets the date/time stamp of the local file to
the date/time of the remote file after it has successfully uploaded the
file. Now the two files will look identical! However, this may cause
other problems: You cannot synchronize this local directory with any
other directory on the same machine, or with a second FTP site, because
every time you upload a file, its date/time changes! Therefore it is
important that if you use synchronize between a directory and FTP, you
do not use synchronize with this directory to more than one location!


4. Other problems and their solutions

Problem: The FTP server may be in a different time zone than your
computer! For example, the server could be located in California, while
you are in New York, or even in Europe!
Solution: Before comparing, select the time zone difference in hours
between your location and the server. If the server is to the west, the
difference is positive. Example: From New York to California it's 3
hours, and from Germany 9 hours.

Problem: Before you started to use Synchronize dirs, you uploaded the
files using Windows Commander directly, or some other tool. Now even
identical files will look different!
Solution: To avoid that you need to re-upload or download all files
which are identical anyway, select all files from which you know that
they are identical. Right click on them, then choose 'Set local file
date to remote date'. This will make the files look identical.


Problem: Unix machines distinguish between upper- and lowercase file
names. Windows machines, however, can only display mixed case names, but
do not distinguish between files with different case.
Solution: When Windows Commander uploads a file to an FTP server, and a
file with the same name but different case already exists on the server,
the uploaded file will get the name of the already existing file. This
avoids that two files with the same name will exist in the same
directory. If you want to upload a different file name with the file,
you will have to delete the target file first (select+right click
menu->delete). For files which do not already exist on the server, you
can choose whether the file should be uploaded without a name change, or
with the name converted to lowercase.

Problem: Unix machines store text files in a different way than
DOS/Windows machines. Unix machines store the line end sign in a single
character, while DOS/Windows uses two characters (carriage return / line
feed). Therefore text files (including HTML) are smaller on Unix than on
DOS machines!

Solution: When Windows Commander encounters two files with same time
stamp, but different size, it counts the line ends of the local files,
and calculates the size of the Unix-style text file from this. If the
sizes match, the Synchronize function will show the following symbol: 


For more information, see the Synchronize dirs dialog box.



-- 
Michal Kracik

[EMAIL PROTECTED] wrote:
> 
> I'm writing and have mostly working a script that syncs files on a local
> system to a FTP server.  The only remaining problem has to do with the file
> time.  Ideally, I would like the file write time on the FTP server to be the
> same as the file I'm uploading.  I have no idea how this would be done.  An
> acceptable alternative would be to reset the local file time to that of the
> one I just uploaded.  I already know how to get its time.  If someone would
> be so kind as to tell me hoe to set the write time of a loca file I would
> much appreciate it.
> 
> Brad Emerson
> 
> [EMAIL PROTECTED]

Reply via email to