Why is an obviously invalid file name allowed?

May 24, 2010
855
0
Northlake, Il
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?
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly @SMWRITE invalid handle Support 8
Chen Touboul When i try to delete an empty folder i got "the dirctoy name is invalid" Support 3
thorntonpg option /u not working The directory name is invalid Support 5
Alpengreis Fixed New INI directive "ANSIWin10" is invalid Support 2
T Invalid attach tabs list Support 10
gschizas Fixed Cannot use extended path to delete invalid file Support 3
jbanaszczyk Invalid client configuration file Support 6
tmaynard Invalid item name "Lua" Support 6
Stefano Piccardi Issue: MKLINK /J creates invalid link [TCC 14.03.53] Support 4
T TCC reading TCMD.INI causing "Invalid item name" warnings and pauses Support 2
S WAD _exit returns invalid code under some conditions Support 13
S Fixed BDEBUGGER died on invalid watch request Support 4
fromano Invalid parameter 12.0.34 x64 Support 1
P Help > Update triggers invalid configuration Support 3
David McClelland TC10 - cdd /t gives invalid parameter Support 2
B Invalid updates configuration file. ?? Support 2
J History file load hangs if file has complete garbage in it... Support 1
jdanielp Cannot step into and/or call another .bat file when debugging .bat file Support 2
thorntonpg file explorer - short cut keys Support 1
JohnQSmith New online help file wrong logo Support 7
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
samintz How to? swap endianness in a binary file Support 12
vefatica `Back quotes` - command line vs. batch file Support 5
fpefpe How to? batch file size Support 2
Jay Sage Issues With TCMD File Explorer Support 0
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
Joe Caverly @FILESIZE and NTFS File Stream Support 1
Joe Caverly Embedding an .EXE (or other file) into a .BTM Support 8
U Command help on file names Support 5
S Concatenate all playlists into 1 file Support 22
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
Joe Caverly Rename file that begins with Emoji Support 7
Joe Caverly PSHELL and NTFS File Streams Support 2
P Kill all other instances of tcc from a btm batch file Support 2
D ffind hangs on large file Support 18
Alpengreis Documentation Minor issue in help file for view /E Support 1
fpefpe batch file ending early Support 18
J Licesne file location Support 1
K robocopy cancelling batch file processing Support 28
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
A Unable to pass batch file arguments unaltered Support 18
MikeBaas How to...extract a string from a .json-file? Support 10
vefatica LIBRARY and file name completion? Support 4
D What does the file "..\Everything\Run history.csv" store? Support 5
H Takecommand.pdf failed not a pdf file Support 6
Joe Caverly DIRectory Colorization in v25 Help File Support 0
C show file description? with dir? Support 8
D When copying/moving, appending " (2)" to filename when the target file already exist. Support 7
R How to? Dir specific file search patterns with spaces in the pathnames? Support 6
Joe Caverly _EXPANSION in help file Support 0

Similar threads