[comp.sys.amiga] multiple file copy using arp copy, how?

lai@vedge.UUCP (David Lai) (05/25/88)

Is there an equivalent to the unix 'cp'

	cp file1 file2 f3 f4 x* dest_dir

I tried arp's copy in various contortions:

	copy file1 file2 f3 f4 to ram:
	copy file1 file2 f3 f4 x* to ram:
	copy f* x* to ram:
	copy f*,x* ram:
	etc...

each time it complains with a message

	copy wildcards to wildcards

Does copy accept multiple files in the source wildcard(s)?  How do I
specify them?  The only way I have been able to use copy is to specify
a single file, or a single wildcard as the source.
-- 
	"What is a DJ if he can't scratch?"  - Uncle Jamms Army
The views expressed are those of the author, and not of Visual Edge, nor Usenet.
David Lai (vedge!lai@larry.mcrcim.mcgill.edu || ...watmath!onfcanim!vedge!lai)

acphssrw@csuna.UUCP (News Manager) (06/01/88)

In article <336@vedge.UUCP> lai@vedge.UUCP (David Lai) writes:
>Is there an equivalent to the unix 'cp'
>
>	cp file1 file2 f3 f4 x* dest_dir

AmigaDOS's wild cards are surprisingly powerful:

	copy x#?|file1|file2|f3|f4 to dest_dir

Unfortunately, the ARP Copy won't do this:  it only gets the first file.
The bug has been reported to the ARP people on BIX.  Also, even the
AmigaDOS Copy appears only to handle the wild-carded argument x#? if
it is the first one in the list.

Stephen Walton, representing myself		swalton@solar.stanford.edu
Cal State, Northridge				rckg01m@calstate.BITNET

vkr@osupyr.mast.ohio-state.edu (Vidhyanath K. Rao) (06/03/88)

In article <1234@csuna.UUCP>, acphssrw@csuna.UUCP (News Manager) writes:
> AmigaDOS's wild cards are surprisingly powerful:
> 	copy x#?|file1|file2|f3|f4 to dest_dir
> Unfortunately, the ARP Copy won't do this:  it only gets the first file.
I was successful once with
     copy (file1|file2|...) to dest_dir
I was puzzled (and still am) as to why the parantheses made a difference.
I have not had an occasion to ry it again. Blame my memory if this fails.

ford@elgar.UUCP (Ford Prefect ) (06/06/88)

In article <1234@csuna.UUCP> acphssrw@csuna.UUCP (Stephen R. Walton) writes:
>AmigaDOS's wild cards are surprisingly powerful:
>
>	copy x#?|file1|file2|f3|f4 to dest_dir
>
>Unfortunately, the ARP Copy won't do this:  it only gets the first file.
>The bug has been reported to the ARP people on BIX.  Also, even the
>AmigaDOS Copy appears only to handle the wild-carded argument x#? if
>it is the first one in the list.

I seem to remember running into another problem with filename-patterns
the AmigaDOS copy command: It only copies files which match one of the
first five patterns between the |'s.  I built a script to copy the
essential files from sys:c to ram:c, and tried to do it like this:

	mkdir ram:c
	copy c:list|dir|copy|run|info|execute|rename|delete|endcli ram:c
	assign c: ram:c

But it only copied list, dir, copy, run, and info.  It did not copy
execute, rename, or any of the others that I listed.  (I don't really
remember which order I listed the commands in, I just remember that I
had to split it into several copy commands of no more than five files
each.)

Does anyone know if this is a real bug?  Perhaps my Amiga was under the
influence of sunspots or something...  :-)

					-=] Ford [=-

"Once there were parking lots,		(In Real Life:  Mike Ditto)
now it's a peaceful oasis.		ford%kenobi@crash.CTS.COM
This was a Pizza Hut,			...!sdcsvax!crash!kenobi!ford
now it's all covered with daisies." -- Talking Heads

toebes@sas.UUCP (John Toebes) (06/06/88)

In article <2076@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:
>> In article <336@vedge.UUCP> lai@vedge.UUCP (David Lai) writes:
>> AmigaDOS's wild cards are surprisingly powerful:
>> 	copy x#?|file1|file2|f3|f4 to dest_dir
>I'm impressed. I don't recall seeing an alternation operator like that in
>the AmigaDOS docs.
>> Unfortunately, the ARP Copy won't do this:  it only gets the first file.
>That's really weird. After all, Jeff Lydiatt's wildcard routines handle
>this case just fine... and I believe that he's associated with ARP. My
>guess, for what it's worth, is they broke the wildcard stuff putting the
>MS-DOS style wildcards in. This is, of course, totally uninformed
>specualation that I engage in to help support my bias against such
>meddling... but there you have it.
Yes, you are right - you are totally uninformed.  Perhaps you might
consider checking your sources first next time.

The wildcard implementation was done from scratch based on algorithms in the
'Software Tools' book.  I coded them by looking at the original AmigaDos
specifications (the 3 white books) and added features as appropriate.  The
final version was recoded in Assembler to take advantage of all the tricks
I could.  Charlie Heath is responsible for the Lion's share of putting
everything together.

In the process I added * as an alias to #? (ABSOLUTELY no difference) and the
code to handle multiple wildcards across multiple directory levels (*/*/*.c).
The implementation does not allow for the alternative operator '|' except
within parenthesis.  If AmigaDos does handle this correctly and consistantly
then it might be worth adding.

/*---------------------All standard Disclaimers apply---------------------*/
/*----Working for but not officially representing SAS or Lattice Inc.-----*/
/*----John A. Toebes, VIII             usenet:...!mcnc!rti!sas!toebes-----*/
/*------------------------------------------------------------------------*/

vkr@osupyr.mast.ohio-state.edu (Vidhyanath K. Rao) (06/07/88)

In article <532@sas.UUCP>, toebes@sas.UUCP (John Toebes) writes:
> The implementation does not allow for the alternative operator '|' except
> within parenthesis.  If AmigaDos does handle this correctly and consistantly
> then it might be worth adding.
Most of the time when I want to use | I I am not in the right directory
anyway. If the `from' argument of copy can be `multiargs', I will be happy
to live with the limitation mentioned. May be a poll should be run.

peter@sugar.UUCP (Peter da Silva) (06/13/88)

In article <532@sas.UUCP>, toebes@sas.UUCP (John Toebes) writes:
> In article <2076@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:

> >> AmigaDOS's wild cards are surprisingly powerful:
> >> 	copy x#?|file1|file2|f3|f4 to dest_dir

> >I'm impressed. I don't recall seeing an alternation operator like that in
> >the AmigaDOS docs.

> >> Unfortunately, the ARP Copy won't do this:  it only gets the first file.

> >That's really weird. [ my uninformed speculation about MS-DOS stuff
> > breaking Jeff Lydiatt's code follows ]

> Yes, you are right - you are totally uninformed.  Perhaps you might
> consider checking your sources first next time.

Nah, it's more fun getting flamed. You don't do it right, though: that was
actually a perfectly reasonable response to my message. You need to tell me
I'm incompetant, lazy, and power-hungry as well. 

> The wildcard implementation was done from scratch based on algorithms in the
> 'Software Tools' book.

Ah, good old Software Tools. The original Ratfor one, I hope...

> In the process I added * as an alias to #? (ABSOLUTELY no difference) and the
> code to handle multiple wildcards across multiple directory levels (*/*/*.c).
> The implementation does not allow for the alternative operator '|' except
> within parenthesis.  If AmigaDos does handle this correctly and consistantly
> then it might be worth adding.

That's OK. I can put the parentheses in just fine. It'd be nice if you allowed
the '*' to perform its documented purpose: being an handle for Input()  (or for
Output()).

One wildcard *I* would like to see added is the moral equivalent of VMS's [...]
syntax. I'm sure you have VMS systems at SAS, somewhere, but if not here's
how it works:

	DEV:[DIRECTORY.PATH]FILE.EXT;VER

This is DEC's file name format.

	DEL [...]*.OBJ;*

This deletes all .OBJ files in the current directories and all subdirectories.
It's a "tree" operator. Perhaps you can do this:

	delete @/*.o	; single-character token preferred
	delete .../*.o	; Make the VMS weenies happy until they make
			; a directory named "...".
-- 
-- Peter da Silva      `-_-'      ...!hoptoad!academ!uhnix1!sugar!peter
-- "Have you hugged your U wolf today?" ...!bellcore!tness1!sugar!peter
-- Disclaimer: These may be the official opinions of Hackercorp.