Page 1 of 1
Copy - setting an Autoprefix
Posted: 02 Aug 2010 20:55
by acheton
Hi there,
I've been using the Drag & Drop menu option when moving files between panes which works well. I particularly like the ability to suffix with the current date however what I'd really like to be able to do is to prefix the copied file with the date rather than suffix it. So instead of:
Filename-20100802.txt
I would have:
20100802 filename.txt
Is this possible to achieve? The reason I'd like to do this is that I've used this format for many years and would like to retain it! Any suggestions most warmly entertained
blessings,
Ach
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 06:22
by serendipity
acheton wrote:Hi there,
I've been using the Drag & Drop menu option when moving files between panes which works well. I particularly like the ability to suffix with the current date however what I'd really like to be able to do is to prefix the copied file with the date rather than suffix it. So instead of:
Filename-20100802.txt
I would have:
20100802 filename.txt
Is this possible to achieve? The reason I'd like to do this is that I've used this format for many years and would like to retain it! Any suggestions most warmly entertained
blessings,
Ach
Its possible, but not with drag & drop. Use below script and assign it to keyboard shortcut or toolbar button instead:
Code: Select all
//Copy selected files from active pane, paste into inactive pane and prefix with current date
copyas "<date yyyymmdd> *.?", "<get path i>\";
Hope that helps.
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 09:06
by admin
I liked the idea and added a powerful tweak to the next version. Now back to the
hammock...!

Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 10:48
by acheton
admin wrote:I liked the idea and added a powerful tweak to the next version. Now back to the
hammock...!

Enjoy!
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 14:36
by acheton
serendipity wrote:
Its possible, but not with drag & drop. Use below script and assign it to keyboard shortcut or toolbar button instead:
Code: Select all
//Copy selected files from active pane, paste into inactive pane and prefix with current date
copyas "<date yyyymmdd> *.?", "<get path i>\";
Hope that helps.
Thanks for the hint, it works fine but I've done something which works better for me:
Code: Select all
rename b, "<date yyyy-mm-dd> *",;
This renames the highlighted file using my preferred format which works better than copying it.
Thanks for the help.
ach
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 19:31
by serendipity
acheton wrote:serendipity wrote:
Its possible, but not with drag & drop. Use below script and assign it to keyboard shortcut or toolbar button instead:
Code: Select all
//Copy selected files from active pane, paste into inactive pane and prefix with current date
copyas "<date yyyymmdd> *.?", "<get path i>\";
Hope that helps.
Thanks for the hint, it works fine but I've done something which works better for me:
Code: Select all
rename b, "<date yyyy-mm-dd> *",;
This renames the highlighted file using my preferred format which works better than copying it.
Thanks for the help.
ach
Well its your fault then, your post title says "Copy - .... ". Its clear from your post that you wanted to move/copy files to other pane using D&D. Why did you not mention rename in the first place?
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 19:42
by acheton
serendipity wrote:Well its your fault then, your post title says "Copy - .... ". Its clear from your post that you wanted to move/copy files to other pane using D&D. Why did you not mention rename in the first place?
Hey no offence intended you answered my original query perfectly. I just realised after I'd used it that a rename followed by D&D to copy would work better for me. Thanks for all your help

Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 19:47
by serendipity
acheton wrote:serendipity wrote:Well its your fault then, your post title says "Copy - .... ". Its clear from your post that you wanted to move/copy files to other pane using D&D. Why did you not mention rename in the first place?
Hey no offence intended you answered my original query perfectly. I just realised after I'd used it that a rename followed by D&D to copy would work better for me. Thanks for all your help

No, I am not offended, just wondered what made you change your original query from copy to rename.
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 19:51
by admin
Whatever, I added an improved way to attach dates because of this thread, so it was good for something after all. Aaah, I think I get some Thai massage now...
Re: Copy - setting an Autoprefix
Posted: 03 Aug 2010 20:22
by acheton
serendipity wrote:No, I am not offended, just wondered what made you change your original query from copy to rename.
Well I realised that by using the button to do the copy and rename in one step it was automatically copying the file to the tab focussed in the other pane. This relied on me having the correct tab focussed in the other pane which is not always the case - hence why a rename works best for my purposes. Hope that helps explain.