1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

hidden directory copy bug

Discussion in 'Support' started by jabelli, Mar 12, 2009.

  1. jabelli

    Joined:
    Oct 29, 2008
    Messages:
    83
    Likes Received:
    0
    COPY help states:
    <table style="line-height: normal; width: 520px; height: 47px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr style="vertical-align: baseline;" valign="baseline"> <td width="48">/H</td> <td>Forces COPY to process hidden and system source files, as well as normal files. The hidden and system attributes from each source file will be preserved when creating the destination files.</td></tr></tbody></table>​
    However:
    Code:
    1.85G C:\Documents and Settings\jabelli&gt; md tmp0
     
      1.85G C:\Documents and Settings\jabelli&gt; md tmp0\a
     
      1.85G C:\Documents and Settings\jabelli&gt; md tmp0\b
     
      1.85G C:\Documents and Settings\jabelli&gt; attrib /d +h tmp0\a
      ____D________ -&gt; _H__D________  C:\Documents and Settings\jabelli\tmp0\a
     
      1.85G C:\Documents and Settings\jabelli&gt; dir tmp0
     
      Volume in drive C is Boot          Serial number is 585e:fd20
      Directory of  C:\Documents and Settings\jabelli\tmp0\*
     
      03/12/2009  23:21        &lt;DIR&gt;    .
      03/12/2009  23:21        &lt;DIR&gt;    ..
      03/12/2009  23:21        &lt;DIR&gt;    b
                      0 bytes in 0 files and 3 dirs
          1,986,910,720 bytes free
     
      1.85G C:\Documents and Settings\jabelli&gt; copy /h/s tmp0 tmp1
      TCC: (Sys) There are no more files.
      "C:\Documents and Settings\jabelli\tmp0\*"
      TCC: (Sys) There are no more files.
      "C:\Documents and Settings\jabelli\tmp0\a\*"
      TCC: (Sys) There are no more files.
      "C:\Documents and Settings\jabelli\tmp0\b\*"
          0 files copied
     
      1.85G C:\Documents and Settings\jabelli&gt; dir tmp1
     
      Volume in drive C is Boot          Serial number is 585e:fd20
      Directory of  C:\Documents and Settings\jabelli\tmp1\*
     
      03/12/2009  23:22        &lt;DIR&gt;    .
      03/12/2009  23:22        &lt;DIR&gt;    ..
      03/12/2009  23:22        &lt;DIR&gt;    a
      03/12/2009  23:22        &lt;DIR&gt;    b
                      0 bytes in 0 files and 4 dirs
          1,986,907,648 bytes free
     
      1.85G C:\Documents and Settings\jabelli&gt; ver /r
     
      TCC  10.00.59  Windows XP [Version 5.1.2600]
      TCC Build 59  Windows XP Build 2600  Service Pack 3
      Registered to John Belli - 1 System License
     
      1.85G C:\Documents and Settings\jabelli&gt;
    This also happened with TC 9. OK, I suppose these are directories, not files, but I expect hidden attributes to be preserved on directories as well.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,809
    Likes Received:
    82
    jabelli wrote:

    > normal files. The hidden and system attributes from each source file
    > will be preserved when creating the *destination* files.

    WAD, and not a bug. COPY preserves hidden attributes for files;
    however, you're creating a new directory, not a file, so there's nothing
    to preserve.

    BTW, /H is an obsolete relic maintained solely for compatibility with
    old 4DOS batch files -- you should be using the much more versatile
    /A:... syntax nowadays.

    (Years ago, somebody requested that COPY behave as you want, but the
    suggestion was shouted down by other users.)

    Rex Conn
    JP Software
     

Share This Page