New Folder/File name templates

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
leinad
Posts: 47
Joined: 17 Jun 2010 09:08

New Folder/File name templates

Post by leinad »

Hi,

I'm new to this forum, I'm evaluating XYplorer since yesterday and am quite impressed.

I'm a user of xplorer2, but I've never came to feel quite used to it, so I'm looking for an alternative, and this one seems to be quite right.

I've noticed that in the "NEW" section I do get a couple of templates like "New Folder", "New Folder yyyymmdd" and "New Folder yyyy-mm-dd", which was quite surprising.

It turns out that the nomenclature I'm using for over 3 years now is yyyy.mm.dd, so I'm unwilling to switch to yyyymmdd or yyyy-mm-dd.

I do use a python script which I've integrated in the windows context menu which allows me to create new files/folders providing my naming convention as a default. It's a popup with a text field with only the date as a default value, which I then can enrich with additional information, ie "2010.06.15, Backup Desktop"

So my question is: Is it possible to remove the two templates "New Folder yyyymmdd" and "New Folder yyyy-mm-dd" replacing them by "New Folder yyyy.mm.dd" and "New Folder yyyy.mm.dd + popup for edit"? The same goes to the "New Files" options.

And if not, is there another way to archieve this type of folder creation?

Kind regards,
Daniel

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: New Folder/File name templates

Post by admin »

Hi,

in the INI file (XYplorer.ini) you find a section like this:

Code: Select all

[NewTemplates]
; Tweak: 3 templates for New Folder default names
Version=1
Folder0=\N\e\w \F\o\l\d\e\r
Folder1=yyyymmdd
Folder2=yyyy-mm-dd
; Tweak: 3 templates for New File default names
File0=\N\e\w \T\e\x\t\f\i\l\e
File1=yyyymmdd
File2=yyyy-mm-dd
NewFolderTemplateIndex=4
Here you can manually alter the default templates. Never mind the backslashes (this is a very old part of the program, I was not that clever in those days... :wink: ), so the rule is: every letter that is not meant to be part of a date formula ("yyyy" etc) must be escaped by a backslash. So to achieve your pattern as default for new folders you simply open the INI in an editor and do this:

Code: Select all

Folder0=yyyy.mm.dd
Then save the INI and start XYplorer (or "restart without saving" otherwise your editings will be overwritten).

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: New Folder/File name templates

Post by j_c_hallgren »

leinad wrote:I'm new to this forum, I'm evaluating XYplorer since yesterday and am quite impressed.

I'm a user of xplorer2, but I've never came to feel quite used to it, so I'm looking for an alternative, and this one seems to be quite right.
Hi and welcome to the XY forums! Thanks for taking a look at XY! Now, I'll be the first to say that XY has some features that x2 doesn't and vice-versa, but hopefully XY will have enough of what you need to make it something you'll want to purchase.

Also, I just wanted to chime in to say that you've now seen another great aspect of XY: The responsiveness of the author, Don, to user posts here...and his promptness in doing so...of course, that somewhat depends on the time of day (as he has to sleep also) but it's not that unusual.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

leinad
Posts: 47
Joined: 17 Jun 2010 09:08

Re: New Folder/File name templates

Post by leinad »

admin wrote:Here you can manually alter the default templates.
Excellent, that worked. Now, one minor glitch would be that if I create a folder 2010.06.17, and then use that same template again, it'll suggest the name 2010.06-01.17, whereas 2010.06.17-01 would be more appropiate.

Another question, which is of a similar nature: I've noticed that it's possible to quickly append a template to a file, a template defined with PostfixDate="-yyyy-mm-dd". This is nice, but my convention is to prefix certain files with the date (and sometimes also the current time yyyy.mm.dd - hh.nn.ss - filename.ext). Can this be done via a script and integrated into the context menu such that it appears in the same dropdown as "Append modified date"?

I've also just noticed that the format assigned in PostfixDate="..." is not used in the Append modified date. Where is that PostfixDate variable used?

Thanks Don for your quick initial reply.
The responsiveness of the author, Don, to user posts here
That's great, there are not many products on the market where the developer tries to establish a direct contact with the customers. I've just had one of those great experiences with the developer of the Chilkat components. I will certainly take this into account when making my decision.

Regarding the differences to xplorer2, I just noticed that XYplorer doesn't have breadcrumbs, too bad :(

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: New Folder/File name templates

Post by admin »

leinad wrote:
admin wrote:Here you can manually alter the default templates.
Excellent, that worked. Now, one minor glitch would be that if I create a folder 2010.06.17, and then use that same template again, it'll suggest the name 2010.06-01.17, whereas 2010.06.17-01 would be more appropiate.

Another question, which is of a similar nature: I've noticed that it's possible to quickly append a template to a file, a template defined with PostfixDate="-yyyy-mm-dd". This is nice, but my convention is to prefix certain files with the date (and sometimes also the current time yyyy.mm.dd - hh.nn.ss - filename.ext). Can this be done via a script and integrated into the context menu such that it appears in the same dropdown as "Append modified date"?

I've also just noticed that the format assigned in PostfixDate="..." is not used in the Append modified date. Where is that PostfixDate variable used?
PostfixDate is used in many places internally -- everywhere where name collisions have to be avoided.

However, the "Append modified date" is a script that you can freely edit in Tools / Customize File Associations.
The default you saw is just delivered as an example with the freshly installed app. You can remove it, alter it, and add (button New) any number of new little scripts as you like.

Your script to prefix the current date/time could look like this:

Code: Select all

|"Prefix current date/time" \;*>::rename b, '<date yyyy.mm.dd - hh.nn.ss> - *'

admin
Site Admin
Posts: 66347
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: New Folder/File name templates

Post by admin »

PS: "2010.06-01.17" is a bug of course. So you spotted a bug on your first day, not bad. :wink: Will be fixed in next version.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: New Folder/File name templates

Post by j_c_hallgren »

leinad wrote:Regarding the differences to xplorer2, I just noticed that XYplorer doesn't have breadcrumbs, too bad :(
It does have them, but not in the same manner as x2 did...there is a toonbar icon for it as well...however, that type of thing has been discussed many times before here and here's one prior thread about it: http://www.xyplorer.com/xyfc/viewtopic.php?f=5&t=3865

It's been talked about as being done more like Vista/7 rather than x2 style but both would get similar results.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

leinad
Posts: 47
Joined: 17 Jun 2010 09:08

Re: New Folder/File name templates

Post by leinad »

Hmm, well, I'm not sure if I'd call that breadcrumbs, but it's good to hear that it'll come like it's implemented in Vistas or Win7s native explorer. Will it come this year?

Anyway, this app is a nice little piece of software. I like it, and it looks like it will be one of my most used apps. Great features!

--

BTW: in that pseudo breadcrumbs, what's really cool is that it retains the history of the initial deepest subfolder used before moving upwards in the hierarchy; nice detail!

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: New Folder/File name templates

Post by PeterH »

j_c_hallgren wrote:... toonbar icon ...
That sounds very good :lol: :oops:

(Sorry for this...)

Post Reply