dcsTimestampMod v.3.5
This is a script that I wrote to quickly modify time-stamps using ISO 8601 dates. I have somewhat tested it using American standard dates and it works ok. There are some bugs using American standard. Like i said it was written to use ISO 8601.
This can can copy any time-stamp to any time-stamp. Even copy to clipboard and file names. I also wrote it for my personal use, but thought maybe somebody else will find it useful. I actually use it as a 'custom button' and then left click for one portion of the script and right click for the second portion, and it works great (for me). There is one major bug in that the mods for the DST do not work right. It turns out that according to somewhere in the XY docs (can not remember where I found it) it states that there is a spacing issue and that it has been determined that this is not a bug. Actually there is probably an easy fix that I am missing. Anyway this is posted as is ....
The "CustomButtons (03-05).ini" is there so that you can add a button to YOUR "xyplorer.ini" file.
dcsTimestampMod v.3.5
dcsTimestampMod v.3.5
- Attachments
-
- dcsTimestampMods_v-3-5.zip
- Report from 2014-11-25 12:34:53
Path: N:\progfile\Tools\xyplorer\conf\scripts\dcsTimestampMods\dcsTimestampMods_v-3-5\
Ext;Type;Size;Created;Modified;Name
ini;Configuration Settings;6.31 KB;2014-03-31 22:10:31;2014-04-04 01:00:15;CustomButtons (03-05).ini
xys;XYS File;4.79 KB;2014-04-23 01:09:48;2014-04-23 01:20:38;dcsTimestampMods_v-03-05-00.xys
xys;XYS File;3.12 KB;2014-04-03 14:54:59;2014-04-03 16:05:25;dcsTimestampMods_v-03-05-01.xys
xys;XYS File;2.42 KB;2014-04-03 14:55:17;2014-04-03 16:00:24;dcsTimestampMods_v-03-05-02.xys - (5.93 KiB) Downloaded 132 times
XYplorer user since 2008-08
How can you avoid confusion when a dates have at least six different interpretations around the world?
A notation like 01/02/03 could mean 1 Feb 2003 or 2 Jan 2003 or 2 Mar 2001.
Welcome to clarity - ISO 8601
How can you avoid confusion when a dates have at least six different interpretations around the world?
A notation like 01/02/03 could mean 1 Feb 2003 or 2 Jan 2003 or 2 Mar 2001.
Welcome to clarity - ISO 8601
Re: dcsTimestampMod v.3.5
I use this all the time. Thanks!!
Re: dcsTimestampMod v.3.5
A helpful note: Right click the custom button editor's "clear" button, choose "copy as snippet" and publish that copied snippet here/in the archive.
Beats asking people to modify theirhearts <xyini>s.
(ask them instead to just execute the command ::snippet; and then in the opened textbox, paste the published snippet code)
Beats asking people to modify their
(ask them instead to just execute the command ::snippet; and then in the opened textbox, paste the published snippet code)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: dcsTimestampMod v.3.5
Man, I love XY ! Always, something new to learn / try. Will do.SammaySarkar wrote:A helpful note: Right click the custom button editor's "clear" button, choose "copy as snippet" and publish that copied snippet here/in the archive.
Beats asking people to modify theirhearts<xyini>s.![]()
(ask them instead to just execute the command ::snippet; and then in the opened textbox, paste the published snippet code)
Here it is:
Code: Select all
Snip: CTB 1
XYplorer 14.60.0000, 2014-12-01 09:59:34
Action
NewUserButton
Name
dcsTimestampMods v.3.5
Icon
ScriptL
/***************[ 1997 Christopher L Smith ]********************************
@version 03.05.01
@date 2012-11-28 04:01:46 (c)
@date 2014-04-03 16:00:00 -4
@class XYplorer
@file Scripts for Dates.xys
@author Christopher L Smith ( dewcansam yahoo )
@details To handle ALL requests for date / timestamps possible.
@note ~~~~~
@notes ~ Timestamp method id
1 = Created
2 = Modified
3 = Accessed
4 = Exif
5 = Clipboard
6 = Prefix Filename
7 = Suffix Filename
8 = Now
9 = Debug / pre-set date
Modified Log:
@todo 2014-03-31 06:45:57 CLS +++ added the commands to copy dates to the
clipboard
@todo 2014-03-31 07:07:38 CLS *** modifed file comment header to conform to
doxygen tags
@todo 2014-03-31 08:12:18 CLS *** split script in 2 pieces
@todo 2014-03-31 12:29:47 CLS +++ added the commands to copy dates from the
clipboard.
***************************************************************************/
"~~~~~ Using the CREATED (1) timestamp ~~~~~";
"1-2.Copy Created to Modified"
timestamp m, '<datec>';
"1-3.Copy Created to Accessed"
timestamp a, '<datec>';
"1-5.Copy Created to Clipboard"
copytext "<datec>";
"1-6.Prefix Created to Filename"
rename b, '<datec yyyy-mm-dd_hh-nn-ss>_*', p;
"1-7.Suffix Created to Filename"
rename b, '*_<datec yyyy-mm-dd_hh-nn-ss>', p;
"~~~~~ Using the MODIFIED (2) timestamp ~~~~~";
"2-1.Copy Modified to Created"
timestamp c, '<datem>';
"2-3.Copy Modified to Accessed"
timestamp a, '<datem>';
"2-5.Copy Modified to Clipboard";
copytext "<datem>";
"2-6.Prefix Modified to Filename"
rename b, '<datem yyyy-mm-dd_hh-nn-ss>_*', p;
"2-7.Suffix Modified to Filename"
rename b, '*_<datem yyyy-mm-dd_hh-nn-ss>', p;
"~~~~~ Using the ACCESSED (3) timestamp ~~~~~";
"3-1.Copy Accessed to Created"
timestamp c, '<datea>';
"3-2.Copy Accessed to Modified"
timestamp m, '<datea>';
"3-5.Copy Accessed to Clipboard";
copytext "<datea>";
"3-6.Prefix Accessed to Filename"
rename b, '<datea yyyy-mm-dd_hh-nn-ss>_*', p;
"3-7.Suffix Accessed to Filename"
rename b, '*_<datea yyyy-mm-dd_hh-nn-ss>', p;
"~~~~~ Using the EXIF (4) timestamp ~~~~~";
"4-1.Copy Exif to Created"
timestamp c, '<dateexif>';
"4-2.Copy Exif to Modified"
timestamp m, '<dateexif>';
"4-3.Copy Exif to Accessed"
timestamp a, '<dateexif>';
"4-5.Copy Exif to Clipboard";
copytext "<dateexif>";
"4-6.Prefix Exif to Filename"
rename b, '<dateexif yyyy-mm-dd_hh-nn-ss>_*', p;
"4-7.Suffix Exif to Filename"
rename b, '*_<dateexif yyyy-mm-dd_hh-nn-ss>', p;
"~~~~~ Using the CLIPBOARD (5) timestamp ~~~~~";
"5-1.Copy Clipboard to Created"
timestamp c, <clipboard>;
"5-2.Copy Clipboard to Modified"
timestamp m, <clipboard>;
"5-3.Copy Clipboard to Accessed"
timestamp a, <clipboard>;
ScriptR
/***************[ 1997 Christopher L Smith ]********************************
@version 03.05.02
@date 2012-11-28 04:01:46 (c)
@date 2014-04-03 16:00:22 -4
@class XYplorer
@file Scripts for Dates.xys
@author Christopher L Smith ( dewcansam yahoo )
@details To handle ALL requests for date / timestamps possible.
@note ~~~~~
@notes ~ Timestamp method id
1 = Created
2 = Modified
3 = Accessed
4 = Exif
5 = Clipboard
6 = Prefix Filename
7 = Suffix Filename
8 = DST
9 = Debug / pre-set date
***************************************************************************/
"~~~~~ Using Daylight Savings Time ~~~~~";
"~~~ used to remove 1 hour from time ~~~";
"~~~ !!warning!! does NOT work right ~~~";
//<datem +8h yyyymmdd_hhnnss>
//<datec -8d yyyymmdd>
"8-1.Remove DST from Created timestamp";
timestamp c, '<datec -1h yyyy-mm-dd hh:nn:ss>';
"8-2.Remove DST from Modified timestamp";
timestamp m, '<datem -1h yyyy-mm-dd hh:nn:ss>';
"8-3.Remove DST from Accessed timestamp";
timestamp a, '<datea -1h yyyy-mm-dd hh:nn:ss>';
"8-123.Remove DST from ALL timestamps";
timestamp c, '<datec -1h yyyymmdd_hhnnss>';
timestamp m, '<datem -1h yyyymmdd_hhnnss>';
timestamp a, '<datea -1h yyyymmdd_hhnnss>';
"~~~~~ Using the DEBUG timestamp ~~~~~";
"9-01.debug set CREATED to 2001-01-01 01:01:01"
timestamp c, '2001-01-01 01:01:01';
"9-02.debug set MODIFIED to 2002-02-02 02:02:02"
timestamp m, '2002-02-02 02:02:02';
"9-03.debug set ACCESSED to 2003-03-03 03:03:03"
timestamp a, '2003-03-03 03:03:03';
"9-11.debug set CREATED to NOW";
timestamp c, '<date>';
"9-12.debug set MODIFIED to NOW";
timestamp m, '<date>';
"9-13.debug set ACCESSED to NOW";
timestamp a, '<date>';
"9-24.debug display EXIF date";
msg "<dateexif>";
"9-25.debug display CLIPBOARD (date)";
msg "<clipboard>";
FireClick
0XYplorer user since 2008-08
How can you avoid confusion when a dates have at least six different interpretations around the world?
A notation like 01/02/03 could mean 1 Feb 2003 or 2 Jan 2003 or 2 Mar 2001.
Welcome to clarity - ISO 8601
How can you avoid confusion when a dates have at least six different interpretations around the world?
A notation like 01/02/03 could mean 1 Feb 2003 or 2 Jan 2003 or 2 Mar 2001.
Welcome to clarity - ISO 8601
XYplorer Beta Club