Is there any tool to urldecode a file's name and replace it?
Example:
$ ls
hello%20world.txt
$ urldecode *.txt
$ ls
hello world.txt
|
Is there any tool to urldecode a file's name and replace it? Example:
|
||||
|
|
|
A new blog post covers this with
|
|||
|
|
|
We want this to be able to turn filenames into filenames,
rather than pathnames (i.e., we don't want to add slashes),
so we leave
To actually rename files in the current directory:
If the original (input) filenames contain backslashes, they will probably get mangled. |
|||||||||||||||||
|
|
I think this Perl snippet can be used as a base for what you are looking for. |
|||
|
|
|
Type in shell (or add to .bashrc):
Usage:
Tested in bash, zsh. Credits. |
||||
|
|