View Full Version : Dumb AmigaDOS Question
Parsec
06 June 2003, 00:56
OK this must be obvious, but how do I specify the current directory as a target when copying files? I want the AmigaDOS equivalent of "." in MS-DOS.
AmigaDOS copy demands a source and destination path (unlike MS-DOS where destination can be omitted) but I can't remember how to specify "here" as the destination path:(
Alternatively, lets be lazy and do it in the GUI. I used to use CLIMate on my A500. On a 1200 what is the best modern equivalent, is it Directory Opus? Is it free on the Amiga?
RetroMan
06 June 2003, 01:43
You can use wildcards in CLI as well, but it´s not "*.*" but "#?" .... so if you want to copy all files from df0: to ram: it would be : COPY DF0:#? to RAM: or better COPY DF0: to RAM: ALL :)
Twistin'Ghost
06 June 2003, 02:17
There are countless little shell apps on Aminet that will allow you to use the * wildcard, among tons of other cool shell extensions.
To indicate the current directory you have to specify an empty string: ""
eg:
cd ram:
copy df0:myfile ""
The file "myfile" will be copied from device "DF0" to the current directory (RAM:)
It always annoyed me that they didn't use "*" as a standard wildcard in AmigaDos. There are some PD shells (zshell) that allow '*' and possibly other command formats that are more user-friendly.
Twistin'Ghost
06 June 2003, 02:52
Or you could always use the alias command in your shell-startup. I haven't actually tried aliasing wildcards, but theoretically it should work.
Oh if the PC only had an alias command or better yet, the assign command. Or a shell. (sigh)
Oh if the PC only had an alias command or better yet, the assign command. Or a shell. (sigh)
Yes. When you plug in an extra drive (in Win 95/98 at least) it re-assigns the letters D: E: F: ... etc.. of other devices which means that many programs can't run properly because they can no longer find their data files :)
That only happens if you allow automatic drive letter assignment for the host device.
Also you may want to use UNC instead of dos path, that is the only way to go e.g. for a service - though this is not really Win9X/dos stuff...
Parsec
06 June 2003, 10:05
Originally posted by gary
To indicate the current directory you have to specify an empty string: ""
eg:
cd ram:
copy df0:myfile ""
The file "myfile" will be copied from device "DF0" to the current directory (RAM:)
It always annoyed me that they didn't use "*" as a standard wildcard in AmigaDos. There are some PD shells (zshell) that allow '*' and possibly other command formats that are more user-friendly.
That's the one! Thanks:) A bit strange though - ""
Interesting to see that #? is the wildcard. Being a bit rusty I've tried * and found it didn't work, so either copied the directory or used ALL.
Twistin'Ghost
06 June 2003, 12:23
Originally posted by Parsec
Interesting to see that #? is the wildcard. Being a bit rusty I've tried * and found it didn't work, so either copied the directory or used ALL.
There are different uses for various pattern matching in AmigaDOS' wildcards.
? matches any single character.
# matches whatever follows it.
#? matches anything/everything.
Parsec
06 June 2003, 13:41
Originally posted by Twistin'Ghost
There are different uses for various pattern matching in AmigaDOS' wildcards.
? matches any single character.
# matches whatever follows it.
#? matches anything/everything.
OK, sounds a bit like regular expressions in JavaScript!
Wasn't sure at first why you would use # without ? but it's for things like "copy #.info" and stuff isn't it:)
thomas
11 June 2003, 11:50
No. "Matches whatever follows it" is not exact enough. # means "any number of the following character".
So e#gon matches eon, egon, eggon, egggggon and so on.
#? is just a special case of the above.
There are more fantastic features of the Amiga pattern matching:
you can say (a|b) to hit everything with "a" or "b" at the specified place. So to copy a file with its icon and only these, you can say copy filename(|.info).
And this one:
~(this) matches all files that don't have "this" in the specified location.
delete ~(#?.(jpg|gif|png)) deletes all files that do not end in ".jpg" or ".gif" or ".png".
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.