I always appreciate your willingness to help but sometimes it feels like you are being deliberately obscure. You make comments and ask questions that seem aimed at making someone feel foolish for not knowing what to do and not understanding what's been provided. Having to go round and round with small bits of code and vague clues about what what to do next is sometimes more hindrance than help, and it's darn confusing. I'm giving up on this particular bit of code because it's doing my head in.
Rename only part of a file on certain conditions
Re: Rename only part of a file on certain conditions
Windows 10 Pro 22H2
Re: Rename only part of a file on certain conditions
Vague? I'm utterly precise.
small bits and code? Because the main code has already been posted and even the help file has several examples how to loop over selected items^^
The shortest version is this:
small bits and code? Because the main code has already been posted and even the help file has several examples how to loop over selected items^^
The shortest version is this:
Code: Select all
foreach($item, <get SelectedItemsPathNames>, <crlf>, "e") {
$base = (exists($item) == 1) ? gpc($item, "base") : gpc($item, "file");
$newName = regexreplace($base, "\.(?![0-9])", " ");
renameitem($newName, $item, 1);
}
One of my scripts helped you out? Please donate via Paypal
Re: Rename only part of a file on certain conditions
I've been secretly watching in hope that the 'secret sauce' would finally be revealed (thx kiwichick for reviving this)! So thx highend for doing so because this is WAY above my head! I was naive to think I could tackle scripting something like this at my current level.
Works great!
Works great!
Re: Rename only part of a file on certain conditions
You're welcomechumbo wrote: ↑24 Apr 2022 11:01 I've been secretly watching in hope that the 'secret sauce' would finally be revealed (thx kiwichick for reviving this)! So thx highend for doing so because this is WAY above my head! I was naive to think I could tackle scripting something like this at my current level.
Works great!
Windows 10 Pro 22H2
Re: Rename only part of a file on certain conditions
Clearly your idea of being precise differs to that of some people. Thank you very much for supplying the code required.
Windows 10 Pro 22H2