<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx</link><description>Set the wayback machine to DOS 1.0.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55389</link><pubDate>Wed, 22 Oct 2003 19:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55389</guid><dc:creator>Gregor Brandt</dc:creator><description>Jeez I'm old.   I knew that one :-(

Gregor
</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55390</link><pubDate>Wed, 22 Oct 2003 20:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55390</guid><dc:creator>pdq</dc:creator><description>single sided 160k floppies with no hard drive. Why would anyone want subdirectories. The overhead takes up valuable disk space.

I can still remember the day we got our original 32k, dual floppy PC from the store. It was the first one they sold. I wish I kept the Technical Reference Manual...

</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55391</link><pubDate>Wed, 22 Oct 2003 21:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55391</guid><dc:creator>Yeep</dc:creator><description>Isn't it because Unixes have this and CP/M (or what was it), which became MS-DOS, was loosely based on Unix principles? And wasn't there something with $aux and $clk as well? Or was that OS/2?
I truly hope that &amp;quot;the next version of Windows&amp;quot; will give the command prompt the same flexibility as Unixes have. The ability to 'pipe' data from one commandline app to the next and things like that. The Bash shell is really good at that. I heard rumors that the next command prompt for windows will have support for scripting using the .NET CLR. I hope it will be as good as Bash's support. Oh, and I know you can get Bash for Windows, but then it'll try and make your command prompt look like Unix completely, with the forward slashes and all and I don't like that.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55392</link><pubDate>Wed, 22 Oct 2003 22:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55392</guid><dc:creator>pdq</dc:creator><description>There is an AUX, but I don't know what clk is.

MS-Dos was not based on CP/M. CP/M ran on 8080/Z80 processors. The predecessor to MS-DOS was an imitation of CP/M running on the 8088 that some dude in a Seattle computer store had written. I'm sure you can find various versions of the story online. I think it's also in TV program &amp;quot;Pirates of Silicon Valley&amp;quot;, although I imagine if it's on TV, it can't be too accurate.

AUX still works, buy the way, but I have no idea where it goes to.

Speaking of CON:, there was no good editor initially for the PC, (no Edlin is not a good editor), so people often used Copy CON: filename to type text in a file.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55393</link><pubDate>Wed, 22 Oct 2003 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55393</guid><dc:creator>Yeep</dc:creator><description>Here's a link to a site with the history of DOS. It seems I was indeed wrong.
http://members.fortunecity.com/pcmuseum/dos.htm</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55394</link><pubDate>Wed, 22 Oct 2003 23:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55394</guid><dc:creator>Michael Geary</dc:creator><description>AUX goes, of course, to the AUX device. I think by default, AUX is the same as COM1.

Back when &amp;quot;dual monitors&amp;quot; meant VGA + monochrome, I wrote a little DOS device driver called OX.SYS that redirected AUX device output to the monochrome display.

I was going to call it AUX.SYS but that didn't work! :-)</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55395</link><pubDate>Wed, 22 Oct 2003 23:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55395</guid><dc:creator>Richard Tallent</dc:creator><description>While you could certainly do the things that Raymond suggests using these &amp;quot;magic filenames,&amp;quot; they were indeed part of the CP/M clone heritage of MS-DOS and other operating systems before it that also treat devices as files. The ones I remember: PRN, AUX, CON, LPT1, LPT2, COM1, COM2, NUL, CLOCK$. 
More LPT and COM options were added later, as were some other DOS-specific ones for HIMEM, the MS Mouse, etc.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55396</link><pubDate>Wed, 22 Oct 2003 23:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55396</guid><dc:creator>Mike Dunn</dc:creator><description>Yeep - check out 4DOS/4NT at www.jpsoft.com. I can't live without it. I haven't used *nix in ages, so I don't know how Unix-y or un-Unix-y it is, but I recommend it either way.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55397</link><pubDate>Thu, 23 Oct 2003 00:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55397</guid><dc:creator>Yeep</dc:creator><description>Mike, thanks. I did remember 4DOS when I typed my first response, but I figured it wiuld be discontinued by now. I used it for a while in '93 or '94 (also tried NDOS by Norton Enterprises I believe the company was called then).</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55398</link><pubDate>Thu, 23 Oct 2003 03:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55398</guid><dc:creator>Bertrand Fan</dc:creator><description>Wow, I've spent a great portion of my life typing copy con and having no idea what it meant. Thanks.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55399</link><pubDate>Thu, 23 Oct 2003 06:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55399</guid><dc:creator>phaeron</dc:creator><description>The device names feature actually caused me quite a bit of trouble on the last product I worked on, where typing &amp;quot;lpt1&amp;quot; as the name of your new project would cause the full-screen UI to lock while waiting for a printer.  We couldn't find a 100% reliable way on all Win32 platforms to detect the devices, so we just hardcoded a list of reserved names.

Also, if you use NT escape syntax to create a file with a full path including a reserved name (\\?\c:\lpt1), all the file query UIs will return the filename to innocent programs, which will happily turn around and open the printer.  I created &amp;quot;lpt1&amp;quot; on a guy's desktop once and it took Explorer 5 minutes to respond every time it refreshed the desktop!
</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55400</link><pubDate>Thu, 23 Oct 2003 08:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55400</guid><dc:creator>e8johan</dc:creator><description>When discussing dos, cmd, 4dos, bash, etc. I must mention one of my small pet projects. It is currently in the planning stage, but here it is anyway:

I feel that cygwin is too big while cmd is to primitive. There is a minimalistic replacement of &amp;quot;all&amp;quot; bash commands that one uses day-to-day: busybox. Why not make it portable. It seems to rely on a libbb which is included in the source as a separate directory. The biggest problem is probably that it is too much unix-specific, but, hey - I'll give it a shot today.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55401</link><pubDate>Thu, 23 Oct 2003 09:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55401</guid><dc:creator>Centaur</dc:creator><description>Who said we have to wait for “the next version of Windows” to pipe? We have been able to pipe since DOS, and all versions of DOS and Windows command processors support stdout to stdin piping. 4DOS/4NT and NT CMD (if I’m not mistaken) also added ability to pipe (stdout+stderr) to stdin.</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55402</link><pubDate>Thu, 23 Oct 2003 15:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55402</guid><dc:creator>Mat</dc:creator><description>Although there is a minimal amount of redirection and piping available in DOS, it's nowhere near as powerful or flexible as under unix.  Something like &amp;quot;cat foo | sort | uniq | head&amp;quot; is just not possible...</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55403</link><pubDate>Thu, 23 Oct 2003 18:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55403</guid><dc:creator>alois</dc:creator><description>hi!, somehow it seems that you are quite into the &amp;quot;old&amp;quot; stuff, so i just try to ask my question on 16-bit Windows in here.
We still have an old program here, coded in 16-bit Borland Pascal 7.0, which is quite cool (in old terms) by the way. 
Our program requires quite a lot of memory. When the (modern) task manager of Windows XP shows something like 450 MB used by the ntvdm, that is hosting my app, suddenly my app doesn&amp;#180;t get any more memory and quits unexpectly with either a GPF in krnl386.exe or just a GPF in myapp.exe.
Do you know anything about the big thing behind this, and what are maximum figures and limitations for the use of memory in 16bit programs.
(hope you know more than me...)
thx, alois
PS: Sorry to post here! Please remove my comment, if something like this is not wanted :-)</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55404</link><pubDate>Thu, 23 Oct 2003 19:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55404</guid><dc:creator>jeff</dc:creator><description>Mat said: Something like &amp;quot;cat foo | sort | uniq | head&amp;quot; is just not possible...

While I'm not sure about DOS (it's been awhile since I've used it), any Win32 system (Win9x, WinNT, XP, etc) can certainly do what you describe.  Go to http://unxutils.sourceforge.net/ and download the &amp;quot;GNU utilities for Win32&amp;quot;

inside the \usr\local\wbin directory of the zip file, you'll find cat, sort, uniq, and head (as well as other utilities) that all work exactly as you describe.
</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55405</link><pubDate>Fri, 24 Oct 2003 08:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55405</guid><dc:creator>Anonymous</dc:creator><description>You can pipe as many programs as you want (as long as they fit in the limit for a command line), and cat foo | sort | uniq | head is just a matter of whether you have suitable implementations of cat, sort, uniq and head. cat can be loosely replaced with type, sort comes with the OS (although the one from unxutils is somewhat faster), and there are at least two ports of GNU utilities, including uniq and head. One was referenced by jeff in the previous comment, and the other is at http://gnuwin32.sourceforge.net/ .</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55406</link><pubDate>Fri, 24 Oct 2003 14:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55406</guid><dc:creator>Nicolas</dc:creator><description>You CAN write this under Windows 2000/XP :

dir /b | sort

or

netstat /an | find &amp;quot;LISTENING&amp;quot;

or

dir &amp;gt;c:\temp\file.txt 2&amp;gt;&amp;amp;1

You can also do wonders with the FOR /F commands, etc. etc.

Most people just assume that Microsoft is too dumb to implement such basic things. Hint : just type &amp;quot;help&amp;quot; at the command prompt, and/or consult the inline help accessible through the &amp;quot;Start&amp;quot; menu. You might be surprised of what you read.

That's not considering any additional software ; if you mix in the win32 version of the GNU toolset or the AINTX tools (http://www.dwam.net/docs/aintx/), then you can do anything you want. Add a little Python for scripting et voil&amp;#224; !

Regards,

</description></item><item><title>RE: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#55407</link><pubDate>Fri, 31 Oct 2003 19:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:55407</guid><dc:creator>gary</dc:creator><description>I remember doing some VBA for Access 2.0 and not being able to think for the life of me why the application would crash on my database row that had the value of 'PRN'.</description></item><item><title>re: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#59725</link><pubDate>Sat, 17 Jan 2004 21:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:59725</guid><dc:creator>Bob</dc:creator><description>Pre XP, NUL was also used the verify a CD.&lt;br&gt;&lt;br&gt;DC drive: echo F | xcopy /s/e *.* nul&lt;br&gt;&lt;br&gt;would copy all of the CD files to a nul dataset.&lt;br&gt;</description></item><item><title>re: What's the deal with those reserved filenames like NUL and CON?</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#59727</link><pubDate>Sat, 17 Jan 2004 21:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:59727</guid><dc:creator>Bob</dc:creator><description>I have the Technical Reference.</description></item><item><title>A new scripting language doesn't solve everything</title><link>http://blogs.msdn.com/oldnewthing/archive/2003/10/22/55388.aspx#585050</link><pubDate>Thu, 27 Apr 2006 17:00:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:585050</guid><dc:creator>The Old New Thing</dc:creator><description>You need to interoperate with batch files</description></item></channel></rss>