Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: AmigaMance on August 03, 2006, 05:39:29 PM
-
It seems that AmigaDos is unable to handle filenames that contains parenthesis. It can not copy, rename, delete them and so on.
For example, copy dh7:my_file(new).txt ram: fails until i use the WorkBench, open the window of dh7: and rename the file by removing the (). Then AmigaDos can handle the file properly. Why is this happening?
-
Hey, you're right. It happens with delete and rename too.
I never noticed this because I always use a filemanager (ABCdir) for copying and deleting and there is no problem with these filenames in the filemanager.
-
I guess you are not familiar with amigados wildcard syntax?
The following are reserved for pattern matching:
( ) [ ] ~ | # ? % `
Here's what they do
? matches any single character. so a? matches all 2-letter words beginning with a.
# matches zero or more copies of whatever follows it, so b#a matches b, ba, baa, and so on.
() groups expressions together - useful in combination with | and ~
~ negates the meaning of whatever follows it. Hence ~(#?.info) matches everything which doesn't end in .info
| represents an either/or choice. e.g. foo.(txt|doc) will match both foo.txt and foo.doc
[] defines a letter range. e.g. [a-d].txt will match a.txt, b.txt, c.txt and d.txt,
% matches the null (empty) string. Never really found much use for this one :-)
` escapes the next character if it is any of the above wildcards. You'd need this for your brackets to suppress their wildcard meaning.
The most common combination wildcard is #? means any quantity of anything, i.e. everything!
-
I guess you are not familiar with amigados wildcard syntax?
Wrong guess.. I just want to know why this happens.
-
AmigaMance wrote:
I guess you are not familiar with amigados wildcard syntax?
Wrong guess.
Then you should know (see earlier post) that brackets are used by the wildcard system and need to be escaped if you are using them in filenames, which of course you shouldn't because they are reserved for the wildcard system :-P
-
Then you should know (see earlier post) that brackets are used by the wildcard system and need to be escaped if you are using them in filenames
Alternately, you could just put the path/filename in quotes, as well. :-)
But, of course, for the sake of sanity... DON'T USE THE RESERVED CHARACTERS! :-D
-
@karlos
Oh, i see now. Thanks, i wasn't that familiar with wildcards.
-
@Ilwrath
I just tried to use quotes but it doesn't work. so, yeah, it's better not to use reserved characters. In fact i never use them. I got the filenames from the internet.
-
If you think amigados wildcards are harsh, you'd love RegEx syntax :-D
-
As karlos said, though, you can still manipulate the files using the apostrophe, IE:
rename file_'(with_brackets').txt file_without_brackets.txt
-
Maybe off-topic a little, but I like to pattern match on ~(*.*) in script files. It works a treat.
-
As karlos said, though, you can still manipulate the files using the apostrophe, IE:
rename file_'(with_brackets').txt file_without_brackets.txt
Oh, right. This works. :-)