Skip to content

how to do chars mapping #95

Answered by ayoisaiah
mo-han asked this question in Q&A
Jan 2, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

After looking into it a bit more, you can achieve this with the chaining feature:

f2 -f '.*' -r '{f}{ext}' -f '\|' -r '' -f ':' -r '' -f '\*' -r '' -f '\?' -r '' -f '"' -r '' -f '<' -r '' -f '>' -r ''

The initial -f and -r pair selects all the files in the directory and retains the same name, while subsequent pairs finds each target character and replaces them with your preferred character. You only need to escape the characters that are significant in regex.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mo-han
Comment options

@ayoisaiah
Comment options

Answer selected by mo-han
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants