Re: retaining dates on files and folders



=?Utf-8?B?UmF5?= <Ray@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:
This must be such a stupid question that no one will give me a hint as to how
to solve it.

Not a stupid question at all, in fact I'm somewhat surprised that
Windows users don't find great glee in accomplishing this via

<left ctrl><right alt><left and right shift><middle click using your nose><and then drag>

One possible solution:
If you grab a little collection of unix-look-alike tools that will
run under Windows just fine then I believe the cp command has an
option to do exactly this.

My more than decade old ancient MKS Toolkit uses -m to do this

cp -m file1 file2

will copy file1 to file2 and will retain the timestamp of file1
on file2, that is what the -m option does.

For POSIX compatibility, which is newer than what I use, this

http://www.icewalkers.com/Linux/ManPages/cp-1.html

says that POSIX uses -p option to preserve not only timestamp
but permissions AND all the other attributes of the file. But
I learned BSD decades ago haven't made the switch to POSIX.

And you can find a cp that will work under Windows without a
lot of trouble.

Or as others suggested, the sledgehammer approach of archiving
and unarchiving the file just to subvert the timestamp change.

Reminds me of the time a few decades ago where some kid found he
could copy his file to Norway to run through a file converter and
get back the modified file. People were not amused at the
bandwidth he was using, back when the net was far smaller and
bandwidth still seemed to matter.

"Ray" wrote:
Is there a setting in Windows that will tell the system to retain the
original date of files and folders when they are copied?
We get files from overseas and they go through several systems each time
being copied. We need to know the original date that the file was created. by
the time we get them the date and time is today not the date and time the
files were created.
So we have to discover the date and time and then manually set that date
into our program.

At one time I was told that if the ARCHIVE attribute was set to A then the
file would retain the original date and time. But that does not seem to work
anymore.
I was told that ROBOCOPY from the Windows resource kit would do this but it
is a command line product and I really do not want that.

Any suggestions? Thanks
--
Ray
.



Relevant Pages

  • Re: PWDUMP Parser
    ... file1 the list of 200 names you want ... file2 the 3000 line list of names /hashes ... If this is under windows just download grep for windows otherwise you should ... > approximately 200 user names/hash pairs from it. ...
    (Pen-Test)
  • Re: system calls
    ... If you are writing a WIndows App, you are expected to program it using the Windows ... If you are writing a POSIX app, use the POSIX API, and be prepared for whatever it ... to a Unix API, should I write to Gnome, or KDE, or what? ...
    (microsoft.public.vc.mfc)
  • Re: Getting a Machines Uptime Remotely
    ... The UPTIME is from the Timestamp of a TCP packet. ... Windows will provide TCP timestamp information, ...
    (Pen-Test)
  • Re: Python 2.5.1 broken os.stat module
    ... |>> when DST starts and also when DST ends, even though the file has NOT ... Windows is not claiming ... | That local textual representation of the modification timestamp is what ... And without a timezone attached, ...
    (comp.lang.python)
  • Re: Issue related to Microsofts patch for Daylight Saving Time.
    ... it *appears* that update KB931836 or a related update has ... Updated the timestamps of all files in the Windows filesystem so as to add ... Modified" timestamp of certain files for which the file timestamp has been ... Windows design that stores all file time stamps in UTC. ...
    (microsoft.public.windowsxp.general)