Copy Time Stamp from file to another one

Advanced Renamer forum
#1 : 04/07-16 00:50
Gabarito
Gabarito
Posts: 4
I'm gladly surprised by finding out this excellent tool to rename file names!
Congrats for program staff. Great job.

It helped me to insert numbered sequence into a list of files.
I was learning to use Regular Expression to make this using other program, but AdvancedRename works like a charm. :D

Now, I found that you have a forum too!
Only good news!

So, I still have a task to do, and it's a repetitive and bored one.
Sometimes I need to change the time stamp of a file or a list of files to match the time stamp from other one. It's not a rename task, I know that, but pehaps you may suggest another tool to copy time stamp from one file to another. I also have a tool to change time stamp. But it would be great if I could COPY it from another file (Created, Modified and Accessed datas).

Any ideas?


04/07-16 00:50
#2 : 04/07-16 03:44
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
I know bulkfilechanger from nirsoft, but I doubt it can copy dates from other files.. also doubt AE could do that.

It does sound like a job for a script tho, I could write a quick one if it's not too complicated and you are willing to install and setup python on your machine

[email protected]

cheers


04/07-16 03:44
#3 : 04/07-16 18:21
Gabarito
Gabarito
Posts: 4
Reply to #2:

[It does sound like a job for a script tho, I could write a quick one if it's not too complicated and you are willing to install and setup python on your machine ]

Oh, please, do that.
It would help me a lot!

And point out where to install Python.

Many thanks!


04/07-16 18:21
#4 : 05/07-16 01:13
G. Lambany
G. Lambany
Posts: 187
Reply to #3:
I would need you to explain to me how do you want it to copy the dates. The script is a one shot execution with no interface, except the command line. So for example it could copy all the dates of all files in a folder, to all the files in another folder, assuming alphabetic order to do the copy.

This is only an example, but I will need that from you if you want a script, else there is nothing I can do

that is why I've put my e-mail adress in there, since posting a message here doesn't notify me of the post

cheers


05/07-16 01:13
#5 : 05/07-16 01:37
Gabarito
Gabarito
Posts: 4
Reply to #4:

I'll write here in case someone else has interest to this subject.
And I'll send the same to your e-mail.

Command line isn't a problem. Graphic interface isn't necessary.
You may put something like this:
copystamp %1 %2
where %1 is the source file of stamp datas and %2 is the destination file.

Just this.


05/07-16 01:37
#6 : 05/07-16 02:53
G. Lambany
G. Lambany
Posts: 187
Reply to #5:
Install python 2.7:

https://www.python.org/downloads/

Download CopyDates.py from here:

http://pastebin.com/nZH137bQ

put copydates.py in the python directory C:\python27\
use the following command:

c:\python27\python.exe copydates.py "<source file>" "<destination file>"

don't forget the quotes, because they are essential with path that have space in them

this script runs only on windows (any version) btw

cheers!


05/07-16 02:53 - edited 05/07-16 02:55
#7 : 06/07-16 15:46
Gabarito
Gabarito
Posts: 4
Reply to #6:

I want to express my gratitude to Guillaume for his great help by sending me a Python script that solved my needs.

Thank you, Guillaume!


06/07-16 15:46