AmigaDOS illegal character in filenames
I'm trying to work on files and drawers that contain illegal characters in their names. Specifically, names containing brackets ()
Example: gametitle(publisher) If I list a folder with a title like this I get no results. Odd things happen when trying to work with files with titles like this. I tried to rename these items with the rename command but that fails. Rename via Workbench works, but that's no help in a script. How do you work with files with illegal characters in AmigaDOS? Thanks |
You must use the wildcard '?' in your scripts instead of the illegal characters but, in the case you mention, you must make sure that gametitle?publisher? refers uniquely to the drawer gametitle(publisher) and not, for example, gametitle[publisher] as well.
|
Wildcards will help you to delete the badly named files but not much more.
Better you escape the offending characters with the ' sign. Code:
rename "gametitle'(publisher')" "gametitle-publisher" |
Well, that's a couple of new things I've learned today. :) Thanks Thomas! :bowdown
|
Many thanks, I have learned something useful too.
To solve my problem, I am using a utility from aminet called case (util/cli/case.lha) which can remove lists of characters from filenames (amongst other things!). I just need to pass it a full list of amigados illegal characters. I know about ()[]~#?' Anyone know where can I find a full list of illegal (or inadvisable) filename characters? Thanks EDIT Scrap that, case has a -k option that strips everything from a filename except letters and numbers and a few other safe characters (dot dash etc.). Perfect! |
All times are GMT +2. The time now is 17:15. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.