User command to rename file

English support forum

Moderators: white, Hacker, petermad, Stefan2

NotNull
Senior Member
Senior Member
Posts: 269
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: User command to rename file

Post by *NotNull »

It looks like the issue with possible problematic characters is in Total Commander and not in PowerShell (or in the interaction between the two).
I tested a wide range of those characters in PowerShell and all seem to go well.

No TC available at the moment, so I can't test that part.


EDIT:
Quick tip: If you want to know how to escape certain characters in PS, use tab completion on the filename.
Example for "$uperman's !@#$%^&()-+~` friend.txt" : type gi .\$ followed by <TAB> and you will get:

Code: Select all

gi '.\$uperman''s !@#$%^&()-+~` friend.txt'
(note the double ' )
Post Reply