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

Why is an obviously invalid file name allowed?

Discussion in 'Support' started by mathewsdw, Dec 8, 2012.

  1. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    This is pretty simple. The command Type NUL: >ABC:EFG.txt creates a file named just "ABC" with no error being generated, whereas the command Type NUL: >ABC*EFG.txt fails with an error as one would hope. The problem isn't specifically the colon because that can be explicitly tested for when verifying the file name, the problem is that there may be other invalid characters that produce the same results, and since I'm not fond of a program/batch file creating a file name that is not what the user specified, this is unacceptable to me. What's the deal here?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    It's not an invalid filename -- it's a valid name with an NTFS stream. See the help file for details.
     
  3. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Thank you, Rex!!! All I can say is "DUH!!!!" :) I haven't used an NTFS stream for more years than I can remember.
     

Share This Page