Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    BECCLES, Suffolk, England
    Thanked 0 Times in 0 Posts

    Copy Batch file (Win)

    Some help please: we give our clients a CD with a menu on it. Part of the menu (should be) is a copy data files from the CD to the programme directory. Needless to say a lot of people's CD drives will not necessarily be D:/. Currently the batch file line looks like:
    COPY Mm_information_Files*.mm6 C:Money

    Is this right please?
    <IMG SRC=> Didn't think that I made my first post here on 5th February 2001...!

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Quedgeley, Gloucester, England
    Thanked 1 Time in 1 Post

    Re: Copy Batch file (Win)

    I suspect it would be extremely easy for you to try it!

    Right or wrong, I have simulated the effect by creating a directory on my external drive E: and in Windows Explorer clicking on a BATch file placed therein:<pre>for /f %%a in ('cd') do set drvdir=%%a
    echo %drvdir% (which gave E:$TEST$ )
    set drv=%drvdir:~0,2%
    echo %drv% (which gave E: )</pre>

    So your COPY command would then follow as:
    COPY "%drv%Mm_information_Files*.mm6" C:Money

    Just remove the echo lines before use. You might want to put the entire "from" path in double-quotes, just in case you ever have a space in the pathname.

    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts