Re: Copying Files / Created Date
From: Michael Harris \(MVP\) ("Michael)
Date: 02/02/05
- Next message: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Previous message: Gerry Hickman: "Re: Count of items in a collection (array)?"
- In reply to: Tom: "Copying Files / Created Date"
- Next in thread: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Reply: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Reply: Tom: "Re: Copying Files / Created Date"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Feb 2005 16:20:33 -0800
> I have a script that checks whether a file on the server is newer
> than the a version on the machine from which the script is run.
> If the file on the server was created more recently than the one on
> the local machine, it replaces the the file on the local machine with
> the newer copy.
>
> This sounds to me like a reasonable process, except it is falling down
> because the creation date on the local machine version of the file
> isn't being updated. I thought I would deal this by deleting the
> local version of the file and then copy the server one to the local
> location. The problem persists and even though the local file is
> deleted and replaced with a newer version from the server, once the
> file has been copied it still keeps the Created Date from the
> original file that has been deleted.
>
> ...
This has been discused before in the scripting NGs...
That's Windows at work ;-)... The process of updating an existing file by
deleting it then creating a new file (or renaimg some temp file) with the
same name as the original is very common among apps that edit documents.
If that sequence occurs within 15 seconds, Windows treats it as an update of
an existing file. To defeat that behavior, you have to intoduce at least a
15 second delay between the delte of the old file and the creation of the
new file of the same name.
-- Michael Harris Microsoft MVP Scripting
- Next message: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Previous message: Gerry Hickman: "Re: Count of items in a collection (array)?"
- In reply to: Tom: "Copying Files / Created Date"
- Next in thread: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Reply: Tarjei T. Jensen: "Re: Copying Files / Created Date"
- Reply: Tom: "Re: Copying Files / Created Date"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|