delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/22/09:31:19

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rob Uiterlinden" <uiterl AT xspamxnlr DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: make 3.79.1 problem with copy command (Windows XP)
Date: Thu, 22 Jul 2004 15:28:43 +0200
Organization: NLR
Lines: 53
Message-ID: <cdofgc$ckgh$1@simian.nlr.nl>
NNTP-Posting-Host: dasa005w.nlr.nl
X-Trace: simian.nlr.nl 1090502988 414225 137.17.196.78 (22 Jul 2004 13:29:48 GMT)
X-Complaints-To: mvdberg AT news DOT nlr DOT nl
NNTP-Posting-Date: 22 Jul 2004 13:29:48 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The following problem has entertained me since I switched from Windows95 to
Windows XP.
The "copy" command executed in a makefile does not work as it should.

The following makefile illustrates the problem:
----
test1:
<tab> copy longfilename.txt a.txt
test2:
<tab> copy short.txt b.txt
test3:
<tab> copy short.txt newlongfilename.txt
----

Files longfilename.txt and short.txt both exist.

make test1 gives:
  copy longfilename.txt a.txt
  File not found - LONGFILENAME.TXT
          0 file(s) copied

make test2 gives:
  copy short.txt b.txt
          1 file(s) copied

make test3 gives:
  copy short.txt newlongfilename.txt
          1 file(s) copied

As a result of test1, nothing is copied.
The result of test2 is file B.TXT (upper case)
and the result of test3 is file NEWLONGF.TXT (upper case and truncated to
8.3).

From now on, I will avoid using long file names when the copy command is
involved.
It seems it has something to do with the command shell, because external
programs like
"cp" and "xcopy" work OK. However I need a "copy /a" command to truncate a
file at the first
control-Z character, which neither "cp" nor "xcopy" will do.

I have searched the newsgroup, but haven't found this problem.
Any suggestions for a solution?

-RoB-

My environment variables:
COMSPEC: C:\WINDOWS\system32\cmd.exe
SHELL is not defined
Version: Microsoft Windows XP [Version 5.1.2600]


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019