Sync Timestamps.

Discuss and share scripts and script files...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Sync Timestamps.

Post by SkyFrontier »

For the cases one forget to use "backup to" instead of "copy" (in my case, feature wasn't available when I did that on a external HDD now I need to work with :evil: ), and for a reason or another can't backup/overwrite target folder/files again, I was wondering: what about scripting to solve this?

Code: Select all

//This one will get selected file on inactive pane as base to clone its timestamp attribs (C/M/A)
//to currently selected, focused item on active pane.

"Timestamp Cloner"
   $target = getinfo("item");

   Focus("PI");

   $dateFormat = 'yyyy-mm-dd hh:nn:ss';
   $rC = report("{Created $dateFormat}",1);
   $rM = report("{Modified $dateFormat}",1);
   $rA = report("{Accessed $dateFormat}",1);

   focus("pi");
   goto $target;

   timestamp a, "$rA";

   timestamp c, "$rC";

   timestamp m, "$rM";
The idea is the script could check pane 1 against pane 2 and if (and only IF - sort of error checking) all items' names match, proceed cloning timestamp from source (pane 1, correct timestamps) to target (pane 1, wrong timestamps that need to be updated based off pane1). Can someone please improve this to match this goal?
Thanks!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply