home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 68,054 of 68,980   
   Herbert Kleebauer to R.Wieser   
   Re: How to create a file withe the name    
   02 May 23 11:02:49   
   
   From: klee@unibwm.de   
      
   On 02.05.2023 08:21, R.Wieser wrote:   
      
   >> But only if the file name is not a single letter:   
   >   
   > Mentioning the why of that would have been nice : a single letter followed   
   > by a colon is interpreted as a drive letter.   
   >   
   > And that means that the exception to your exception is that something like   
   >   
   > echo hello>c:$data   
      
   But the correct syntax would be:   
      
   echo hello>c::$data     (doesn't work)   
   echo hello>c:xyz:$data  (does work, but not as expected:  xyz:$data:$DATA)   
   echo hello>c:xyz        (does work, but no alternate stream)   
      
   For two letter file names instead of one letter names all is ok:   
      
   echo hello>bc::$data     (does work)   
   echo hello>bc:xyz:$data  (does work)   
   echo hello>bc:xyz        (does work)   
      
      
   The real problem is, if you use a "for %%i in (*.*) loop to   
   write or read alternate data streams and there are file   
   names with a single letter, you get in trouble. That's   
   the way I got aware of the problem. And it also doesn't   
   help to add a "." to the single letter file name, because   
   then not the file "c" but the file "c." is created (which   
   gets you into even bigger trouble).   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca