revcopyfile: preserve file modification date/time

2004-02-20 Thread James . Cass
What is the best way to preserve file modification date/time  when copied 
to a Windows 2000 server?

I need to preserve the modification date when a file is copied from a 
user's local MacOSX (10.2.x) to a Windows 2000 server.  By default, 
revcopyfile does not preserve the mod date.  The copy of the file has a 
mod date/time of when it was copied. 

I found a work-around by using CpMac -p, and it worked great for a 
while, preserving the mod date/time, but then for some reason, it started 
making the copied file's mod date/time be when it was copied.  And then it 
started working fine again, and now it's back to misbehaving.  So I tried 
using ditto -rsrcFork (ditto --rsrc in Panther), which works great in 
Panther, but in Jaguar I get a file name too long on files whose name is 
longer than 8 characters (violating 8.3).

Thanks in advance,
James

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revcopyfile: preserve file modification date/time

2004-02-20 Thread Rob Cozens
What is the best way to preserve file modification date/time  when copied
to a Windows 2000 server?
Hi James,

The detailed version of the files function returns, among other 
things, the modification dates for each file in the defaultFolder. 
So one needs to:

A.  Save the defaultFolder if it needs restoration
B   Set the defaultFolder to the folder containing the file
C.  Get the detailed files
D.  Parse the list to find the line for the file*
E.  Get the date as item 5 of that line
F.  Restore original defaultFolder, if necessary
*Note in step D that the file's name is returned URL-encoded.

Now you have the modification date.  How you get the Windows server 
to retain or reset that date is beyond my scope of experience.
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm
And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee.
from The Triple Foole by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: revcopyfile: preserve file modification date/time

2004-02-20 Thread James Cass
Thanks for all the help.  The folder where the file is has thousands of 
files, and getting files details is just way too slow.  However, I 
think I've found a work-around.  On http://www.macosxhints.com, I found 
a reference to a terminal command called SetFile.  It's available 
here (/Developer/Tools/SetFile) after you install Developer Tools.  Try 
a man SetFile at the Terminal for more info.

To change the modification date of a file just do this:  SetFile -m 
8/4/2001 16:13 myFile
To change the creation date of a file just do this:  SetFile -d 
8/4/2001 16:13 myFile

I just tested this and I can change the modification date/time for a 
file on a Windows 2000 Server where I do not have admin privileges, so 
this might do the trick.  I won't know for certain until I test it on a 
user's machine.

Thanks again for the advice...James



On Feb 20, 2004, at 7:57 PM, Christopher Mitchell wrote:

I would almost suggest that saving an internal modification timestamp 
and retrieving it as necessary might be easier than forcing any given 
system to hack its own awareness of the last modification time of a 
file.  I would definitely be interested in hearing how to set Windows 
mod dates though if it is possible.

Yours,
Chris
On Feb 20, 2004, at 5:26 PM, Rob Cozens wrote:
What is the best way to preserve file modification date/time  when 
copied
to a Windows 2000 server?
Hi James,

The detailed version of the files function returns, among other 
things, the modification dates for each file in the defaultFolder. So 
one needs to:

A.  Save the defaultFolder if it needs restoration
B   Set the defaultFolder to the folder containing the file
C.  Get the detailed files
D.  Parse the list to find the line for the file*
E.  Get the date as item 5 of that line
F.  Restore original defaultFolder, if necessary
*Note in step D that the file's name is returned URL-encoded.

Now you have the modification date.  How you get the Windows server 
to retain or reset that date is beyond my scope of experience.
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm
And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee.
from The Triple Foole by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution