Reserved Names

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Lar5
Junior Member
Junior Member
Posts: 18
Joined: 2003-04-11, 19:06 UTC
Location: Denmark

Reserved Names

Post by *Lar5 »

I just read this page http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q120/7/16.ASP&NoWebContent=1
and i had to try to make a file caled 'lpt1' (yes... i'm bored :-)

I press shift+F4, type 'lpt1' and press OK. Then TC stops responding
and my text editor also freezes. Is that normal or is it just my copy
of TC5.51/WinXP that's acting funny?

I know the filename isn't allowed but it's a little rough way to find out.
If I try the same in WinExplorer it just won't make the file... no crash.
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

Heh, funny you should mention it; just a couple of days ago I tried creating a file named [con], and got this weird error message: "This filename is a reserved device name. Please choose another name"; My first experience with this... anyway I believe it's your text editor's fault, I tried a couple of mine, one gave the correct message the other died.

Cheers.
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

Guess what, I am also bored :D So I tried to create the file lpt1, it doesn't work but it does ask to save and saying yes, nothing happens. This is what I did: SHIFT-F4 --> enter filename (lpt1) --> type some garbage --> ALT-F4 --> would you like to save? Yes. Notepad closes and no file is created. If I do this with [con] the file is saved as [con]. No problems. Running WinXP and TC 5.51.

No probs here with those names ;) Just to let you know.

Botak
Registered user #92105
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

I'm on w2k, so it seems [con] is reserved file name on w2k but not on XP; either way the OP's problem is probably the text editor.

Lar5, try opening your text editor and manually creating the new file [lpt1] and see what happens, I'm betting it'll b0rk, alternatively you can temporarily set TC's text editor back to notepad and test that.

Cheers.
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

Post by *compie »

When I try to copy a file (eg. john.txt) with F5 and enter lpt1 as the new name totalcmd stops responding.
So is this a bug in totalcmd or not?
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

compie Posted: Mon Jul 14, 2003 8:05 am Post subject:

--------------------------------------------------------------------------------

When I try to copy a file (eg. john.txt) with F5 and enter lpt1 as the new name totalcmd stops responding.
So is this a bug in totalcmd or not?
Tried that too, also no problem on my WinXP, TC 5.51. Just nothing happens. What happens if you copy in WinExplorer? Also crash?

Botak
User avatar
Lar5
Junior Member
Junior Member
Posts: 18
Joined: 2003-04-11, 19:06 UTC
Location: Denmark

Post by *Lar5 »

If I try to copy a file and change it's name to 'lpt1', the TC copybox stops responding at 0%.
If I name the file 'con', a TC error pops up [Error. Cannot write E:\con]

I guess it's a TC problem. Shouldn't TC check for such reserved names
before trying to create them?
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

I don't think it's a problem/bug related to TC.
Since the good old days of DOS (D-Days :) ) there are some names
related to devices, and hence are'nt allowed to be used for filenames:

PRN, LPT1-LPT3, AUX, COM1-COM4, NUL and CON

I don't claim this list to be complete, maybe some are only existent under a particular OS.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's not a bug, it's a feature! You can choose 'print to file' in any program, which will give you a *.prn file. You can then copy this file to prn or lpt1 with Total Commander with the F5 copy function.
Author of Total Commander
https://www.ghisler.com
rolandd
Senior Member
Senior Member
Posts: 313
Joined: 2003-06-26, 09:02 UTC
Location: Indonesia
Contact:

Post by *rolandd »

Well, that clears everything up :) I guess then opying to LPT1 needs to have the printer on? Or else it can't find a way out :p

Botak
Registered user #92105
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

It's not a bug, it's a feature! You can choose 'print to file' in any program, which will give you a *.prn file. You can then copy this file to prn or lpt1 with Total Commander with the F5 copy function.
Nice, tried it, but it doesn’t seem to work here (no lpt1 printer but a networked one, shouldn't prn work?), it seems it's also impossible to stop the task other than killing TC (abort doesn't work).

Cheers.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

For network printers, you need to use something like
\\servername\printername
Author of Total Commander
https://www.ghisler.com
Post Reply