change file time by created date

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

change file time by created date

Post by *JimmyTheBroker »

Hi guys,

Is is possible to rename files to include a number-format 00, based on the order they were created?


say I have files:
WordIsAProgram.doc created at 12:01
ExcelIsAlsoAProgam.xlsm created at 16:02
AdobeIsAnotherProgram.PDF created at 15:00

is it possible to make it so that the file names become:

01 - WordIsAProgram.doc created at 12:01
03 - ExcelIsAlsoAProgam.xlsm created at 16:02
02 - AdobeIsAnotherProgram.PDF created at 15:00


Thanks!
Jimmy
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

MUT: add counter, related due to creation time

Post by *Stefan2 »

- select your files
- open MUT
- click the header of the date column to sort by date
- add a "[C:2]" in front of the "[N]" at the Name mask box

[C:2] [N]







If this is not possible due of the date, maybe use a work around:

PY Face.py 3.360 07.08.2007 02:55 -a--
PY LexGen.py 9.369 26.04.2009 01:38 -a--
PY ObservedFlower.py 3.747 31.12.2001 07:23 -a--



- add #[hms]#[N]
- rename (unfortunately, we can't sort the New Name column)

#013815#PY LexGen.py
#025550#PY Face.py
#072358#PY ObservedFlower.py




- reload (see button left hand of Start?)

- sort name column


- clear the Name mask filed by removing the #[hms]#[N] part
- add [C:2] [N] into the Name mask box
AND
- search for: #\d+#
[X] RegEx
- replace with nothing



- inspect the new names and the time in the date column

press rename again
done

01 PY LexGen.py 9.369 26.04.2009 01:38 -a--
02 PY Face.py 3.360 07.08.2007 02:55 -a--
03 PY ObservedFlower.py 3.747 31.12.2001 07:23 -a--





 
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

01 - WordIsAProgram.doc created at 12:01
It is not really clear.
I assume that "created at 12:01" is NOT a part of the filename but a comment.

You may create a custom column with the "created date" setting [=tc.creationdate]

- Just do a right click on any column header
- choose "Configure custom columns"
- Press "New"
- Press "Add column"
=> a blank line appears
- Press "+" at most right of the line
=> tc is choosen by default
- Choose property "creation date" and a format to your need
- Press "Apply" and "OK"

Now you have a "creation date" column and you can sort the list by this

Continue with the procedure of Stefan2:
- select your files
- open MUT
- click the header of the date column to sort by date
- add a "[C:2]" in front of the "[N]" at the Name mask box

[C:2] [N]
#5767 Personal license
User avatar
JimmyTheBroker
Member
Member
Posts: 179
Joined: 2017-06-07, 05:22 UTC

Post by *JimmyTheBroker »

sqa_wizard wrote:
01 - WordIsAProgram.doc created at 12:01
It is not really clear.
I assume that "created at 12:01" is NOT a part of the filename but a comment.

Yes, you're correct
Post Reply