Quantcast
Channel: 2BrightSparks
Viewing all articles
Browse latest Browse all 9303

Re: Copy Directory Modification Timestamp

$
0
0
The response from 2BrightSparks was that it just wasn't on the radar. Which is OK, it's their decision, but hey, it's pretty easy & (to me) seems like an obvious hole.

All my Python script does basically is copy/sync all the files inside a directory, and then just makes the time/date stamp of the destination directory the same as the source. These are the key lines:

# Set same directory attributes
shutil.copystat(src_dp, dest_dp)

The "copystat" function copies all the attributes from the source directory (src_dp) to the destination directory (dest_dp).

The logic is simple, it can be done. 2BrightSparks just said that it wasn't a priority.

Viewing all articles
Browse latest Browse all 9303

Trending Articles