Solved

Deleting a file named 'nul'

Posted on 2004-08-23
2
765 Views
Last Modified: 2010-05-18
Here is the problem, a script I have written output its errors to 'nul'
 ie. ls > nul
This is pdksh with a cygwin base for unix commands.
Where the big problem exists is that the script creates a file in the running dir called 'nul'. Windows can not have a file named nul nor can you delete a 'nul' file.... pdksh, bask, csh, dos, windows xp, winpe, all cannot delete the file. I have even tried using rar and other comprestion programs to add the file to an archive and delete the file after making archive, and yet again, the file is still there.
Using cat I can see the contents of the file, but so far that is the only command that can see the file, noptead and all windows based programs error on 'nul' files.
If anyone has a way to delete this file that would be great.
0
Comment
Question by:remyservices
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 11870316
Check out http://support.microsoft.com/default.aspx?scid=kb;en-us;315226 ("How to Remove Files with Reserved Names in Windows XP")
0
 

Author Comment

by:remyservices
ID: 11874376
Thanks, that got it. Been looking for something like that page for some time, thanks alot.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Upgrade or retire 8 96
Windows XP on Acer Aspire One 49 227
How do I install an application contained in an iso file 5 164
Mouse not working on HyperV / Windows XP Mode 4 220
Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question