Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Changing the default "illegal character" replacement charact (Read 12123 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Changing the default "illegal character" replacement charact

Reply #25
well, this might work:

only select those files with a forward slash, '/'
(press ctrl+f, search for '&')

now just replace underscores, '_' with ampersands, '&' for the directory names.

obviously this won't work if there are other underscores in the names with forward slashes.

otherwise, i think you're just SOL.  i know i was. 


.... having said all that, it still doesn't explain why Cosmo was able to replace all the characters, where i was not.

Changing the default "illegal character" replacement charact

Reply #26
i understand what you’re talking about. when using scripts to move and rename files, the $replace() function properly works with ?, <, >, *, and " for both the previews and the actual renaming of the files. but not with /, \, |, or :. when using the latter illegal chars, the preview boxes in the file naming scheme windows will show that $replace(%tag%,'/',-) works, however, the preview box in the move, rename, or copy files window will show that the / is still being replaced with _ and it will be renamed this way also.

you can however use $replace(%tag%,_,-) to replace the /, \, |, and : chars with a string of your choice, just change the - in that script with the string you want.

also, when using $replace(%tag%,_,-), the preview boxes in the file naming scheme windows will show that the / has not been replaced with a -. but the move, rename, or copy files window will, and the file will be renamed this way.

i agree the $replace() function should work with whatever chars you throw at it, and have them properly handled before they are modified for correct filenames.


here is the script that i use to move and rename my albums
Code: [Select]
$if(%artist%,$trim($replace($replace($replace($replace($replace($replace(%artist%,?,),<,{),>,}),'"',''),*,+),_,-)),unknown artist)/[%date%'.' ]$if(%album%,$trim($replace($replace($replace($replace($replace($replace(%album%,?,),<,{),>,}),'"',''),*,+),_,-)),unknown album)/$if(%discname%,$trim($replace($replace($replace($replace($replace($replace(%discname%,?,),<,{),>,}),'"',''),*,+),_,-))'/',[%disc%.])[$left(%tracknumber%,2). ]$trim($replace($replace($replace($replace($replace($replace(%title%,?,),<,{),>,}),'"',''),*,+),_,-))
I use
Code: [Select]
$replace(%tag%,_,-)
in the mass tagger or the move and or rename thing?