Renaming file(s) to modification date
-
kartal
- Posts: 208
- Joined: 14 Aug 2008 18:06
Renaming file(s) to modification date
Hi
I want to rename files via shortcut so I need the script line for renaming with date and modification time.
Here is what I need(after renamed)
Original File(s) Name_ModifDate_ModifTime.ext
I want to rename files via shortcut so I need the script line for renaming with date and modification time.
Here is what I need(after renamed)
Original File(s) Name_ModifDate_ModifTime.ext
-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Renaming file(s) to modification date
Create a new UDC Rename:
Caption: Append item's modified date and time
Pattern: *_<datem yyyymmdd>_<datem hhnnss>
Type: It's a Batch Rename pattern.
Assign a KS and you're done.
Caption: Append item's modified date and time
Pattern: *_<datem yyyymmdd>_<datem hhnnss>
Type: It's a Batch Rename pattern.
Assign a KS and you're done.
FAQ | XY News RSS | XY X
-
ivan
- Posts: 577
- Joined: 02 Apr 2008 12:52
- Contact:
Re: Renaming file(s) to modification date
Once again proves how wildcards are useful for renamingadmin wrote:Create a new UDC Rename:
Caption: Append item's modified date and time
Pattern: *_<datem yyyymmdd>_<datem hhnnss>
Type: It's a Batch Rename pattern.
Assign a KS and you're done.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122


-
kartal
- Posts: 208
- Joined: 14 Aug 2008 18:06
Re: Renaming file(s) to modification date
Twisted!!!!
thanks admin, you saved the day.
thanks admin, you saved the day.
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Renaming file(s) to modification date
Thinking loud. In the right-click context menu of rename special, "date special" could be a good addition.
-
kartal
- Posts: 208
- Joined: 14 Aug 2008 18:06
Re: Renaming file(s) to modification date
COme to think of it, how about renaming with current date and time as well?
-
ivan
- Posts: 577
- Joined: 02 Apr 2008 12:52
- Contact:
Re: Renaming file(s) to modification date
Create a new UDC Rename:kartal wrote:COme to think of it, how about renaming with current date and time as well?
Caption: Append current date and time
Pattern: *_<date yyyymmddhhnnss>
Type: It's a Batch Rename pattern.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122


-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Renaming file(s) to modification date
For me, yes! (Although I have my scripts, UDCs, and POM all set up.) But not sure how many users love to attach modified-dates as much as I do. And in what style...serendipity wrote:Thinking loud. In the right-click context menu of rename special, "date special" could be a good addition.
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Renaming file(s) to modification date
Same here, I use POM too. And liek you said not sure how many really need it. I think unless there is more demand this can rest. And Style? I was dead sure you would ask this. I would simply leave it to user, since there are tweaks for [ListDateFormats] and [ListTimeFormats], one can reference those to rename special.admin wrote:For me, yes! (Although I have my scripts, UDCs, and POM all set up.) But not sure how many users love to attach modified-dates as much as I do. And in what style...
But again, all this user friendliness is for non-script users (which is good). I have my POMs in place.
-
Steadyhands
- Posts: 24
- Joined: 13 Sep 2006 11:47
- Location: Brisbane, Australia
- Contact:
Re: Renaming file(s) to modification date
How would I append the date to the end of the file like this:-
file.txt
file.txt.081023
I've played a bit with this but I must be missing the obvious solution as my first effort
removed the extension
file.txt
file.txt.081023
I've played a bit with this but I must be missing the obvious solution as my first effort
Code: Select all
rename e, "<date yymmdd>"-
Muroph
- Posts: 561
- Joined: 21 Aug 2007 16:13
Re: Renaming file(s) to modification date
use this:
Code: Select all
rename r, "(.+) > $1.<date yymmdd>";My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
-
Steadyhands
- Posts: 24
- Joined: 13 Sep 2006 11:47
- Location: Brisbane, Australia
- Contact:
Re: Renaming file(s) to modification date
Thanks heaps.

-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Renaming file(s) to modification date
I expected this one to work:Steadyhands wrote:How would I append the date to the end of the file like this:-
file.txt
file.txt.081023
I've played a bit with this but I must be missing the obvious solution as my first effort
removed the extensionCode: Select all
rename e, "<date yymmdd>"
Code: Select all
rename , "*.<date yymmdd> /e";FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Renaming file(s) to modification date
I'd agree with that.admin wrote:I expected this one to work:but it just replaces the extension. I'd say this is a bug. If the /e switch is present, then * should refer to the whole name (base+extension), right?Code: Select all
rename , "*.<date yymmdd> /e";
Also, that regex pattern can be simplified further:
Code: Select all
Rename "r", "$ > .<date yymmdd>";-
admin
- Site Admin
- Posts: 66075
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Renaming file(s) to modification date
I'm not that sure anymore. It's a bit confusing:TheQwerty wrote:I'd agree with that.admin wrote:I expected this one to work:but it just replaces the extension. I'd say this is a bug. If the /e switch is present, then * should refer to the whole name (base+extension), right?Code: Select all
rename , "*.<date yymmdd> /e";
Code: Select all
Old Pattern New
This is how it works now:
a.jpg *-<#3> a-3.jpg
a.jpg *-<#3>.png a-3.png.jpg
a.jpg *-<#3> /e a-3
a.jpg *-<#3>.png /e a-3.png
With the new way, the latter two would change as follows:
a.jpg *-<#3> /e a.jpg-3
a.jpg *-<#3>.png /e a.jpg-3.pngFAQ | XY News RSS | XY X
XYplorer Beta Club