Multiple renaming actions on copied files
Multiple renaming actions on copied files
In Windows 7 I often use copy/paste to create a file backup, and then add a date to filename. Copy and paste of a file creates a filename with "- Copy" appended to the name. Currently, I do two XYplorer renaming operations:
Batch Rename to append date:
* <datem yyyy_mmdd>
Next, Search and Replace:
- Copy/
Is there a way to do these two operations with a single action?
Thanks.
Batch Rename to append date:
* <datem yyyy_mmdd>
Next, Search and Replace:
- Copy/
Is there a way to do these two operations with a single action?
Thanks.
Re: Multiple renaming actions on copied files
I've been wondering this myself, but as usual, I won't have access to my desktop for a bit.GamaRex wrote:In Windows 7 I often use copy/paste to create a file backup, and then add a date to filename. Copy and paste of a file creates a filename with "- Copy" appended to the name. Currently, I do two XYplorer renaming operations:
Batch Rename to append date:
* <datem yyyy_mmdd>
Next, Search and Replace:
- Copy/
Is there a way to do these two operations with a single action?
Thanks.
I do quick backups the exact same way. Short of writing a script, I thought I could do this with RegEx, but I didn't know Don used a different backreference character till recently. I wanted to try this, but won't be able to get to it for some time. I've been chomping at the bit to try it out.
Please let me know if you figure this out and I will do the same
Trasd
"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.
"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.
"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.
"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.
Re: Multiple renaming actions on copied files
Code: Select all
foreach ($file, get("selectedItemsPathNames", "|"), "|") {
copyas '* <datem yyyy_mmdd>.?', get("Path", "i"), $file;
}
Double quotes around the date variable are wrong, single quotes are working fine.
Last edited by highend on 14 Sep 2013 10:30, edited 1 time in total.
One of my scripts helped you out? Please donate via Paypal
Re: Multiple renaming actions on copied files
If I understand correctly, right click/hold, move, Copy Here with Current Date.
I want XY to serve soft ice cream. Please Don, make XY serve soft ice cream.
Re: Multiple renaming actions on copied files
You won't get the exact naming structure ("* <datem yyyy_mmdd>.?") with that command.Copy Here with Current Date.
One of my scripts helped you out? Please donate via Paypal
Re: Multiple renaming actions on copied files
I'm sorry, I completely misunderstood! I was thinking of something different.GamaRex wrote:In Windows 7 I often use copy/paste to create a file backup, and then add a date to filename. Copy and paste of a file creates a filename with "- Copy" appended to the name. Currently, I do two XYplorer renaming operations:
Batch Rename to append date:
* <datem yyyy_mmdd>
Next, Search and Replace:
- Copy/
Is there a way to do these two operations with a single action?
Thanks.
You are looking for a batch copy with rename - hum, interesting and useful idea!
Trasd
"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.
"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.
"Any sufficiently advanced technology is indistinguishable from magic." A.C.C.
"I'll tell you this, no eternal reward will forgive us now for wasting the dawn." J. M.
Re: Multiple renaming actions on copied files
Nighted,Nighted wrote:If I understand correctly, right click/hold, move, Copy Here with Current Date.
I think your suggestion will work for my purpose, with this modification:
Right-click, drag to the current folder's tab, choose Copy Here with Last Modified Date.
It doesn't match my date pattern exactly, but it's close enough and very simple to do.
I thought it might require a script to call up a couple of batch actions, but having this already in place as a feature is preferable.
Thanks!
I realize it would have helped if I'd made it clear that I was using the same folder for the copied files, but this technique will allow using the same folder (with my suggested modification) or to any other open folder's tab or pane.
Re: Multiple renaming actions on copied files
I checked the XY settings INI for a tweak that would give more control over the format of the time stamp, but unfortunately could find none. There are other ways to do this, i.e. scripts, den4b Renamer, but that of course requires some more user input, or human.dll as the creator of nLite likes to refer to himself!GamaRex wrote:Thanks!
I realize it would have helped if I'd made it clear that I was using the same folder for the copied files, but this technique will allow using the same folder (with my suggested modification) or to any other open folder's tab or pane.
I want XY to serve soft ice cream. Please Don, make XY serve soft ice cream.
-
- Site Admin
- Posts: 60622
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multiple renaming actions on copied files
Sure, I perform this action about 50 times a day for many years now. It's built in in 2 ways:GamaRex wrote:In Windows 7 I often use copy/paste to create a file backup, and then add a date to filename. Copy and paste of a file creates a filename with "- Copy" appended to the name. Currently, I do two XYplorer renaming operations:
Batch Rename to append date:
* <datem yyyy_mmdd>
Next, Search and Replace:
- Copy/
Is there a way to do these two operations with a single action?
Thanks.
1) Either drag-drop with right mouse button, then select from drop context menu: "Copy Here with Current Date" or "Copy Here with Last Modified Date"
2) Or, when you do it in place, use menu File | Duplicate | Copy Here with Current Date (Ctrl+Shift+Alt+D) or Copy Here with Last Modified Date (Ctrl+Shift+D)
FAQ | XY News RSS | XY Twitter
Re: Multiple renaming actions on copied files
Or, as long as only files (and no folders) are involved (otherwise the script would need a bit of work):
Advantage: You'll get exactly that date format, that you prefer.
Code: Select all
foreach ($file, get("selectedItemsPathNames", "|"), "|") {
copyas '* <datem yyyy_mmdd>.?', get("Path", "i"), $file;
}
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60622
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multiple renaming actions on copied files
You can customize the general date affix format here: Configuration | Templates | Date affix | Date affix (e.g. *-<date yyyymmdd>)
FAQ | XY News RSS | XY Twitter
Re: Multiple renaming actions on copied files
I wondered if it would be possible to modify the date stamp format, and you showed that it is.admin wrote:You can customize the general date affix format here: Configuration | Templates | Date affix | Date affix (e.g. *-<date yyyymmdd>)
I modified my preference to *_<date yyyy_mmdd>
Many excellent suggestions here.
I'll probably alternate between the File, Duplicate menu option and dragging to the current tab for a while to see which I find easier.
I'll hang onto the code as well, in case I want to tinker with that.
Thank you everybody.
-
- Posts: 90
- Joined: 13 Aug 2018 07:16
- Location: USA
Re: Multiple renaming actions on copied files
Wow, 10yo post and just made my life incredible.
I have CTRL+D mapped to "Copy Here With Current Date" but I do this many times a day, and have always manually affixed the Time Stamp in the format...
so instead of this:
filename.docx-20231005
I could get this:
filename.docx-20231005 16-59
But now I was able to change this: *-<date yyyymmdd> -- to this: *-<date yyyymmdd hh-mm>
Thanks for this old post!
I have CTRL+D mapped to "Copy Here With Current Date" but I do this many times a day, and have always manually affixed the Time Stamp in the format...
so instead of this:
filename.docx-20231005
I could get this:
filename.docx-20231005 16-59
But now I was able to change this: *-<date yyyymmdd> -- to this: *-<date yyyymmdd hh-mm>
Thanks for this old post!
XYPlorer, Great Form -- Awesome Function
-
- Site Admin
- Posts: 60622
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multiple renaming actions on copied files
Great! Things like this are the core mission of XY. Whenever you find yourself repeatedly doing something manually, drop me a note. I will write a machine to do the job.
FAQ | XY News RSS | XY Twitter
-
- Posts: 90
- Joined: 13 Aug 2018 07:16
- Location: USA
Re: Multiple renaming actions on copied files
You're the best... this software has not only transformed my productivity -- but made computing fun again. I wish I had found it many years ago.
XYPlorer, Great Form -- Awesome Function