Page 1 of 1
copy file and append yymmdd
Posted: 20 Nov 2008 03:06
by Techworks
I know there is the Ctrl+Shift+Alt+D that copies Here with Suffix Date Now
I see this will also ass an 01, 02 etc if the copy already exists. Great, but how do I reproduce this in a script that I can call in a PFA so whenever i double click a specific file type (mdb) I get a prompt to open or copy with suffux?
Cheers
Grant
Re: copy file and append yymmdd
Posted: 20 Nov 2008 03:43
by serendipity
Just add another script to your existing mdb script.
#165 is the command ID for "Copy Here with Suffix Date Now". You will find the command IDs for all menu items in menu "Tools| Customize Keyboard Shortcuts...". You will find #165 in the category "File". You can use command IDs in places like catalog, address bar, scripts etc.
Re: copy file and append yymmdd
Posted: 20 Nov 2008 22:47
by Techworks
ok, got that working, but how can I get the script code for #165 so I can make a copy and modify it to only do yymmdd rather than yyyymmdd?
Or is this a hard coded feature rather than script?
Re: copy file and append yymmdd
Posted: 21 Nov 2008 00:17
by serendipity
Techworks wrote:ok, got that working, but how can I get the script code for #165 so I can make a copy and modify it to only do yymmdd rather than yyyymmdd?
Or is this a hard coded feature rather than script?
Yes thats the default, but you can definitely have it as yymmdd using some more scripting.
For example this will do it:
Code: Select all
"Copy with suffix"
$item=<curbase>;
#164;
sortby c,d;
setting HideFoldersInList;
sel 1;
rename b, "$item-<date yymmdd>";
Re: copy file and append yymmdd
Posted: 21 Nov 2008 01:47
by jacky
Techworks wrote:ok, got that working, but how can I get the script code for #165 so I can make a copy and modify it to only do yymmdd rather than yyyymmdd?
Or is this a hard coded feature rather than script?
hmm.. pretty sure it uses XY's Date suffix template, which you can change to your liking on Configuration - Report
Re: copy file and append yymmdd
Posted: 21 Nov 2008 03:03
by serendipity
jacky wrote:Techworks wrote:ok, got that working, but how can I get the script code for #165 so I can make a copy and modify it to only do yymmdd rather than yyyymmdd?
Or is this a hard coded feature rather than script?
hmm.. pretty sure it uses XY's Date suffix template, which you can change to your liking on Configuration - Report

, I was not aware of this. I always thought that option was for creating reports.