English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 06 June 2003, 00:56   #1
Parsec
Registered User
 
Parsec's Avatar
 
Join Date: Feb 2003
Location: Lancashire
Age: 49
Posts: 434
Dumb AmigaDOS Question

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?
Parsec is offline  
Old 06 June 2003, 01:43   #2
RetroMan
Registered User
 
RetroMan's Avatar
 
Join Date: Aug 2001
Location: Germany
Age: 51
Posts: 3,704
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
RetroMan is offline  
Old 06 June 2003, 02:17   #3
Twistin'Ghost
Give up the ghost
 
Join Date: Apr 2001
Location: U$A
Age: 33
Posts: 4,662
There are countless little shell apps on Aminet that will allow you to use the * wildcard, among tons of other cool shell extensions.
Twistin'Ghost is offline  
Old 06 June 2003, 02:21   #4
gary
Junior Member
 
gary's Avatar
 
Join Date: Mar 2002
Location: Perth, Western Australia
Age: 50
Posts: 283
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.
gary is offline  
Old 06 June 2003, 02:52   #5
Twistin'Ghost
Give up the ghost
 
Join Date: Apr 2001
Location: U$A
Age: 33
Posts: 4,662
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)
Twistin'Ghost is offline  
Old 06 June 2003, 06:55   #6
gary
Junior Member
 
gary's Avatar
 
Join Date: Mar 2002
Location: Perth, Western Australia
Age: 50
Posts: 283
Quote:
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
gary is offline  
Old 06 June 2003, 08:50   #7
IFW
Moderator
 
IFW's Avatar
 
Join Date: Jan 2003
Location: ...
Age: 52
Posts: 1,838
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...
IFW is offline  
Old 06 June 2003, 10:05   #8
Parsec
Registered User
 
Parsec's Avatar
 
Join Date: Feb 2003
Location: Lancashire
Age: 49
Posts: 434
Quote:
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.
Parsec is offline  
Old 06 June 2003, 12:23   #9
Twistin'Ghost
Give up the ghost
 
Join Date: Apr 2001
Location: U$A
Age: 33
Posts: 4,662
Quote:
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.
Twistin'Ghost is offline  
Old 06 June 2003, 13:41   #10
Parsec
Registered User
 
Parsec's Avatar
 
Join Date: Feb 2003
Location: Lancashire
Age: 49
Posts: 434
Quote:
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
Parsec is offline  
Old 11 June 2003, 11:50   #11
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
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".
thomas is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Probably a dumb question.. xlar54 support.Other 6 03 January 2010 21:20
Question from a dumb American. illy5603 support.Hardware 43 19 September 2009 00:27
Dumb SCSI question... Charlie support.Hardware 26 29 March 2009 08:34
Drakkhen - dumb question dAb support.Games 9 15 December 2005 23:30
Probably a really dumb question... BumpyCarrot New to Emulation or Amiga scene 3 28 February 2003 02:04

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:12.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14730 seconds with 13 queries