My problem:
With a folder "Foldername1" selected and with the Modified Date: 06-16-2022
$mydigit = "7"; rename r, "^(.*?)(\d*)$ > $1$2+1$mydigit($mydigit+1)<space><curname> <datem dd> <datem mm> <datem yyyy> <curlen> <prop #empty> <prop #nosubs>",p;
I get:
Foldername1+17(7+1) Foldername1 16 06 2022 21 2 2
I would like add "1" to the last digit "1". Changing it in a "2"
incr $mydigit offer well a "8" value.
A mistake in my writting script?
A solution, is possible on using "renameitem" and "regexreplace" , I have found it on forum.
So, may be it's not actually able with currents options of "rename".
What are options for the first group $1 "Foldername" and the next $2 "1"?
$Incr $2 or eval ($2+1) are not also valid.
Thanks
Parameterization of variables with rename and the use of a regular expression.
Forum rules
READ THIS AND DO IT!!!
Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
READ THIS AND DO IT!!!
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
-
Nobug
- Posts: 1
- Joined: 18 Aug 2022 14:17
-
highend
- Posts: 14992
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Parameterization of variables with rename and the use of a regular expression.
Not possible, use regexreplace + renameitem
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club