Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewPlus supports using variables such as yyyyMMdd in template folder names or file names #35333

Closed
NightWatch0 opened this issue Oct 9, 2024 · 1 comment
Labels
Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams

Comments

@NightWatch0
Copy link

Description of the new feature / enhancement

NewPlus supports using template strings such as yyyyMMdd (represent the current date) in template folder names or file names.

For example, in “%LocalAppData%\Microsoft\PowerToys\NewPlus\Templates” there are the following folders:

"${yyyyMMdd}: Title"
"${ParentFolderName}-PartA"

When I used the first template on 2024-10-10, it generated:

"20241010: Title"

And when I used the second template inside the "Work" folder, it generated:

"Work-PartA"

In addition, it should be possible to use specific variables to specify the part of the file name that needs to be modified after creating a new file. Usually, after creating a new file, it will switch to the rename file state and select the entire file name in the rename text box, as shown below.
Snipaste_2024-10-09_10-33-08
But most of the time, only specific parts need to be modified. For example, creating a template folder with variables above to get "20241010: Title", user only need to change the last word "Title" to the name of a specific item.
Snipaste_2024-10-09_10-33-41

So I want to be able to use a tag like # to specify the part of the file name that actually needs to be modified, to change the cursor/selection behavior when automatically renaming after creating the file.
The resulting template folder name may look like this:

"${yyyyMMdd}: #Title#"

Scenario when this would be used?

This method can expand the flexibility of the NewPlus module and reduce a large number of renaming operations. It does not introduce too many complex operations, and only requires changing the file name of the template file.

Supporting information

no

@NightWatch0 NightWatch0 added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Oct 9, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams
Projects
None yet
Development

No branches or pull requests

1 participant