Skip to main content

Topic: Changing the default "illegal character" replacement charact (Read 9712 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • golphcart
  • [*][*]
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.
  • Last Edit: 03 November, 2007, 10:52:36 PM by golphcart

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?