doscp problem

Chris Hare / System Manager chris at choreo.COM.COM
Fri Mar 23 06:59:37 AEST 1990


In article <459 at memqa.uucp>, qexal31 at memqa.uucp writes:
> 
> Here is my problem, I am running SCO Xenix 2.3.2 with 60 megs for Xenix and 
> 20 megs for DOS. While under Xenix I am trying to copy several (144) files 
> from the DOS partition using doscp. Here is the command I use:
>              doscp c:clips/exe/*.* *.*

You haven't missed anything.  There is NO WILDCARD support in doscp.  The
reason is that the wildcards perform filename generation, therefore, doscp
cannot.  (I think it is kind of stupid, personally).

Try this - you can adapt it to suit :

$ dosls a: (or whatever device )
$ for entry in `dosls a:`
> do
> doscp a:$entry . (or directory)
> done
$

Be aware that this will also cause all of your files to be named in upper
case.  You can use the following to fix it.

:
# @(#) tolower v1.0
# Copyright Chris Hare 1988
#

if [ ! "$*" ]
then
   echo "Preparing to rename ALL files. OK to continue? (y/n) \c"
   read OK
   case $OK in
      [yY])
	 LIST=`ls`
         break
         ;;
      *)
         echo "Usage : `basename $0` file [ file ... ]"
         exit 1
         ;;
   esac
else
   LIST=$*
fi

for NAME in $LIST
do
   NEW_NAME=`echo $NAME | tr "[A-Z]" "[a-z]"`
   if [ "$NAME" != "$NEW_NAME" ]
   then
      echo "Renaming $NAME to $NEW_NAME"
      mv ./$NAME ./$NEW_NAME
   fi
done

Good Luck

------------------------------------------------------------
Chris Hare, Co-ordinator, Systems Management         *** IT WORKS FOR ME! ***
Authorized SCO Instructor
Choreo Systems Inc.                                  500-150 Laurier Ave W.
                                                     Ottawa, Ontario K1P 5J4
E-MAIL ...!choreo!chris                              Voice (613) 238-1050
                                                     Fax   (613) 238-4453



More information about the Comp.unix.xenix mailing list