View Single Post
Old 05 January 2020, 14:08   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by Foebane View Post
Sounds complicated.

Actually it is not complicated at all. If you enter copy ? it will display the command line template. This template is used to read the command line arguments. This is done by the ReadArgs function independently of the purpose of the command. This means at this stage it does not yet look into the file system and this it does not matter whether a file named ALL is there or not.

The template contains four parameters: FROM, TO, ALL and CLONE. The ReadArgs function parses the command line and fills in these four parameters. If the word ALL is found, the ALL switch will be set on. If the word CLONE is found, the CLONE switch will be set on. If the word FROM is found, the string behind it will be put into the FROM parameter. If the word TO is found, the string behind it will be put into the TO parameter. If neither FROM or TO are found but there are unnamed arguments, the first one will be put into FROM and the last one into TO.

When the ReadArgs function returns, the Copy command will continue with the parameter list returned. It does not look into the command line any more. It uses the switches and strings returned by the ReadArgs function in the parameter list.

So in order to copy the ALL file, you have to think how to tell ReadArgs that the string ALL should go into the FROM place of the parameter list.

Code:
copy from all dh0:
should do it. The "all" string will go into the FROM place because it is preceded by the "from" keyword. "dh0:" will go into the TO place because it is unnamed and FROM is already set.
thomas is offline  
 
Page generated in 0.06456 seconds with 11 queries