#1 2012-10-26 11:47

Dfmu
Member
Registered: 2012-10-26
Posts: 9

File Modified and Created batch backup & restore

Hi , again thanks for the wonderful renamer program.
I'd like to know whether which program able to do a list of batch backup on file Modified and Created and restore it as I wanted ?

Maybe some simple script ? or a program suggestion ?

The reason I wanted this program/script because I wanted to retain the date file modified & creation , for both file and folder.
I found some touch program which able to modified creation/modified/access time line but there's  no backup and I need to touch every file.

Like wise , if I move the whole folder of picture or a log.txt file into a new drive , those whole list of created file/png will be modified with current write date.

I did know , there's no way to retain created date during transfer but I wanted to backup the date list in a batch according with the file name.After I did backup , I plan to restore the original date.

Current Name]    [New Name]            [Date Modified]                 [Date Created]
PC10001.JPG    >   PC1.JPG           26-10-2012 11:00:36 PM   20-9-2012 08:00:10 PM
PC10031.JPG    >   PC2.JPG           26-10-2012 11:00:37 PM   20-9-2012 08:01:50 PM

After transfer

Current Name]    [New Name]            [Date Modified]                 [Date Created]
PC10001.JPG    >   PC1.JPG           26-10-2012 11:00:36 PM   26-10-2012 11:01:36 PM
PC10031.JPG    >   PC2.JPG           26-10-2012 11:00:37 PM   26-10-2012 11:01:37 PM

I wanted to backup and restore it back to original date created or date modified in a batch.
20-9-2012 08:00:10 PM
20-9-2012 08:01:50 PM
Same as above before transfer.

Is there any program recommend or a script needed to do this kind of date backup & restore in  batch for folder and files timestamp ?
I found a touch program but I need to manually rename every file in a list.

Thanks smile

Offline

#2 2012-10-30 03:55

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: File Modified and Created batch backup & restore

Using the File Time functions in PascalScript one could extract the date required, possibly write/backup to a text file, then read from the same and use the Process Execution functions to construct a command line that would call the external touch utility and set the date back to the original value once the renaming was completed successfully. Just giving you some pointers to get you started. Am in a bit of a hurry now unfortunately and not enough free time, so maybe if no-one else has come up with a working script I'll be able to revisit this in future and do the needful (no guarantees though!)

Offline

#3 2012-10-30 15:00

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: File Modified and Created batch backup & restore

Would it be possible to add the dates into the file name?

I mean, in the last comment of this other page there is a script that can be used to restore the dates from the name to the file (But it would need some changes to add the time also) http://www.den4b.com/forum/viewtopic.php?pid=6016#p6016

If it seems good idea, let me know to adapt that code into your case.


If this software has helped you, consider getting your pro version. :)

Offline

#4 2012-10-30 20:35

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: File Modified and Created batch backup & restore

Now that i think I forgot about creation date

But to point out, somehow the "technique" used in the script Here, combined with file write functions can be adapted to do this task...

But i can't do it right now, maybe Andrew or other one wants to look at it, else I'll come back to it later.


If this software has helped you, consider getting your pro version. :)

Offline

#5 2012-11-01 12:31

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: File Modified and Created batch backup & restore

What I'm not really understanding here is, when does the name change occur?

Because (obviously) is not the same trying to restore the dates to the old named file or the new one...

So, mainly my question is, could the script be simplified so that only requires to save the new names (paths preferred)? Or does it need to restore the names also?

P.S.: Sorry about replying so many times in a row.

Last edited by SafetyCar (2012-11-01 12:32)


If this software has helped you, consider getting your pro version. :)

Offline

#6 2012-11-01 18:07

Dfmu
Member
Registered: 2012-10-26
Posts: 9

Re: File Modified and Created batch backup & restore

Andrew wrote:

Using the File Time functions in PascalScript one could extract the date required, possibly write/backup to a text file, then read from the same and use the Process Execution functions to construct a command line that would call the external touch utility and set the date back to the original value once the renaming was completed successfully. Just giving you some pointers to get you started. Am in a bit of a hurry now unfortunately and not enough free time, so maybe if no-one else has come up with a working script I'll be able to revisit this in future and do the needful (no guarantees though!)

Really thanks for the reply.Guess it's possible to do it in pascalscript , take your time , I am not in a hurry or something.
Through my find , only script able to restore the file timestamp.
The most I able to do for command prompt is using Dir to backup the timestamp or getting an application (karen's directory printer or RichCopy) to backup but can't find any application which able to do both backup and restore in a batch.

SafetyCar wrote:

Would it be possible to add the dates into the file name?

I mean, in the last comment of this other page there is a script that can be used to restore the dates from the name to the file (But it would need some changes to add the time also) http://www.den4b.com/forum/viewtopic.php?pid=6016#p6016

If it seems good idea, let me know to adapt that code into your case.

Actually , it's not really related much on restore using a date from a file name.
I mean on individual file with timestamp recorded.Reason as above , the timestamp will get modified no matter on which process transfer file or copy file.
Window Rules
http://computer-forensics.sans.org/blog … properties


SafetyCar wrote:

Now that i think I forgot about creation date

But to point out, somehow the "technique" used in the script Here, combined with file write functions can be adapted to do this task...

But i can't do it right now, maybe Andrew or other one wants to look at it, else I'll come back to it later.

It's just a suggestion , I hope to find a program or a script on doing it.Not in a hurry though big_smile

SafetyCar wrote:

What I'm not really understanding here is, when does the name change occur?

Because (obviously) is not the same trying to restore the dates to the old named file or the new one...

So, mainly my question is, could the script be simplified so that only requires to save the new names (paths preferred)? Or does it need to restore the names also?

P.S.: Sorry about replying so many times in a row.

It's totally different from the renamer but if possible , I hope to combine with the renamer for an easy process.Since renamer able to backup the location of file directory , current name and new name , hoping to backup the timestamp (access,modified,creation) too.
After the transfer , created timestamp will get modified to current time and date .By using the backup matching the name in a shoot to restore a batch of file timestamp.
That is my aim smile

Thanks a lot for spending your time reading my request smile

Offline

Board footer

Powered by FluxBB