Date variables in New Items
-
ugus
- Posts: 211
- Joined: 02 Jun 2006 16:42
Date variables in New Items
If XYplorer could read in a date syntax from the files in the New Items folder it would be really slick!
The date syntax could look like:
Test {yyyymmdd}.log
(If there are folders with sub folders that are copied maybe only the
root folder should have date format or...? have a switch in the syntax to include subfolders? )
/Ulrik
The date syntax could look like:
Test {yyyymmdd}.log
(If there are folders with sub folders that are copied maybe only the
root folder should have date format or...? have a switch in the syntax to include subfolders? )
/Ulrik
-
admin
- Site Admin
- Posts: 66254
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Date variables in New Items
Yep, spontaneous agreement! This is XY thinking!
Only the root items, I'd say. (Else would be much extra work)
Only the root items, I'd say. (Else would be much extra work)
FAQ | XY News RSS | XY X
-
jacky
- XYwiki Master
- Posts: 3106
- Joined: 23 Aug 2005 22:25
- Location: France
- Contact:
-
ugus
- Posts: 211
- Joined: 02 Jun 2006 16:42
Thanks a lot!+ Menu Edit | New Items: Now, date variables are supported.
For example:
1. Create a file named "Log {yyyy-mm-dd}.txt" in the
NewItems folder in app path.
2. Go to some other folder.
3. Open menu Edit | New Items and select the new item (which has
been auto-added here magically)
4. A file called "Log 2007-09-17.txt" will be created!
(If today is 2007-09-17.)
Maybe you can extend this, to include a kind of "action" syntax???
Some wild ideas!
Log {shell$normal}.txt - will create the file and open it directly after.
Test {run$nocopy}.bat - will just run the file (does not copy the file) with the folder path as an argument
-
jacky
- XYwiki Master
- Posts: 3106
- Joined: 23 Aug 2005 22:25
- Location: France
- Contact:
Honestly, I think this is too much/complicated -- this is a NewItems feature, nothing else.ugus wrote:Log {shell$normal}.txt - will create the file and open it directly after.
Test {run$nocopy}.bat - will just run the file (does not copy the file) with the folder path as an argument
I'd rather have, as I mentioned somewhere, Catalog items to support date variables as well. That way, you could jump to/use in Move/Copy operations such files/folders !
I was gonna ask about this, but the other way around. Shouldn't you actually not use the brackets, I mean to be fair & consistent, the syntax elsewhere (Batch Rename, Move/Copy/Backup To, etc) does not use brackets !TitlebarTemplate: in concordance with usage elsewhere in XY, I changed the brackets
Edit: Especially since brackets can totally be used in file/folder names!!
Proud XYplorer Fanatic
-
ugus
- Posts: 211
- Joined: 02 Jun 2006 16:42
OK, you'll maybe right that this is to complicated... this will be covered by the Hot Scripts feature I suppose.jacky wrote:Honestly, I think this is too much/complicated -- this is a NewItems feature, nothing else.ugus wrote:Log {shell$normal}.txt - will create the file and open it directly after.
Test {run$nocopy}.bat - will just run the file (does not copy the file) with the folder path as an argument
Neat idea.jacky wrote: I'd rather have, as I mentioned somewhere, Catalog items to support date variables as well. That way, you could jump to/use in Move/Copy operations such files/folders !
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
I quite like this idea actually. For me nine out of ten times the step after creating the file is to edit it so it would be a small time saver.jacky wrote:Honestly, I think this is too much/complicated -- this is a NewItems feature, nothing else.ugus wrote:Log {shell$normal}.txt - will create the file and open it directly after.
Test {run$nocopy}.bat - will just run the file (does not copy the file) with the folder path as an argument
The problem I see with it is the order of events. As it stands you get to rename/approve the name right after it is created.
Would including {shell$normal} cause it to use the default name or wait until you've approved the name?
Or is it ideal to make it more involved and have {shell$default} use the default name and {shell$approve} waits for you to approve the name before opening for edit?
I'm not sure I see the need for the {run$nocopy} version though. Currently you can put the bat file into the catalog and then drag and drop the path to achieve the same thing.
-
ugus
- Posts: 211
- Joined: 02 Jun 2006 16:42
I think {shell$normal} should use the default name, so that file is just opened for editing.TheQwerty wrote:I quite like this idea actually. For me nine out of ten times the step after creating the file is to edit it so it would be a small time saver.jacky wrote:Honestly, I think this is too much/complicated -- this is a NewItems feature, nothing else.ugus wrote:Log {shell$normal}.txt - will create the file and open it directly after.
Test {run$nocopy}.bat - will just run the file (does not copy the file) with the folder path as an argument
The problem I see with it is the order of events. As it stands you get to rename/approve the name right after it is created.
Would including {shell$normal} cause it to use the default name or wait until you've approved the name?
Or is it ideal to make it more involved and have {shell$default} use the default name and {shell$approve} waits for you to approve the name before opening for edit?
.
The normal argument was for normal focus (but this is maybe irrelevant, maybe "shelled New Items" just should open the file with normal focus)
... so maybe is it better to use
{shell$default} Shell the file in normal focus (no name editing)
{shell$approve} Think you need a msg prompt here (for handling
the events) , the user keeps the default or changes it and then the file is opened.
Yes, you are right. {run$nocopy} is overkill...TheQwerty wrote: I'm not sure I see the need for the {run$nocopy} version though. Currently you can put the bat file into the catalog and then drag and drop the path to achieve the same thing
.
-
admin
- Site Admin
- Posts: 66254
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
I don't get it. What is the part that you don't like?jacky wrote:I was gonna ask about this, but the other way around. Shouldn't you actually not use the brackets, I mean to be fair & consistent, the syntax elsewhere (Batch Rename, Move/Copy/Backup To, etc) does not use brackets !TitlebarTemplate: in concordance with usage elsewhere in XY, I changed the brackets
Edit: Especially since brackets can totally be used in file/folder names!!
FAQ | XY News RSS | XY X
-
ugus
- Posts: 211
- Joined: 02 Jun 2006 16:42
Don, can this be of interest? I know you have this kind of feature in catalog but couldn't this spice up the New Items feature even more{shell$default} Shell the file in normal focus (no name editing)
{shell$approve} Think you need a msg prompt here (for handling
the events) , the user keeps the default or changes it and then the file is opened.
Anyway, I think the date variables should be translated in the menu.
Test {yyyy-mm-dd}.txt should display as Test 2007-09-17.txt in the New Items menu.
-
jacky
- XYwiki Master
- Posts: 3106
- Joined: 23 Aug 2005 22:25
- Location: France
- Contact:
-
admin
- Site Admin
- Posts: 66254
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
No, overkill.ugus wrote:Don, can this be of interest? I know you have this kind of feature in catalog but couldn't this spice up the New Items feature even more{shell$default} Shell the file in normal focus (no name editing)
{shell$approve} Think you need a msg prompt here (for handling
the events) , the user keeps the default or changes it and then the file is opened.
Anyway, I think the date variables should be translated in the menu.
Test {yyyy-mm-dd}.txt should display as Test 2007-09-17.txt in the New Items menu.
Maybe it should, but it's not possible now for internal reasons.
FAQ | XY News RSS | XY X
XYplorer Beta Club