CRIME FTP File Solution

From: BAIRD Dion E * DAS DOIT (Dion.E.Baird@private)
Date: Thu Jan 03 2002 - 07:24:05 PST

  • Next message: Goerling, Richard J. LT (TAD to CGIC Portland): "CRIME NIPC Advisory 01-030.3 Update "Universal Plug and Play Vulnerabilities""

    How to Remove Files with Reserved Names in Windows (Q120716)
    
      _____  
    
    The information in this article applies to:
    
    
    
    *	Microsoft Windows 2000 , Professional 
    
    *	Microsoft Windows 2000 , Server 
    
    *	Microsoft Windows 2000 , Advanced Server 
    
    *	Microsoft Windows 2000 , Datacenter Server 
    
    *	Microsoft Windows NT Server versions 3.1 , 3.5 , 3.51 , 4.0 
    
    *	Microsoft Windows NT Workstation versions 3.1 , 3.5 , 3.51 , 4.0 
    
    *	Microsoft Windows NT Advanced Server 
    
    
      _____  
    
    
    
    SUMMARY
    
    
    Because applications control the policy for creating files in Windows, files
    sometimes are created with illegal or reserved names, such as LPT1 or PRN.
    This article explains how to delete such files using the standard user
    interface. 
    
    
    
    MORE INFORMATION
    
    
    NOTE : You must be logged on locally to the Windows computer to delete these
    files. 
    
    If the file was created on a file allocation table (FAT) partition, you may
    be able to delete it under MS-DOS using standard command line utilities
    (such as DEL) with wildcards. For example: 
    
    
    *	DEL PR?.* 
    
    -or- 
    
    
    
    *	DEL LPT?.* 
    
    
    
    These commands do not work on an NTFS partition as NTFS supports the POSIX
    subsystem and filenames such as PRN are legal under this subsystem. However,
    the operating system assumes the application that created them can also
    delete them; therefore, you can use commands native to the POSIX subsystem. 
    
    You can delete (unlink) these files using a simple, native POSIX
    application. For example, the Windows Resource Kit includes such a tool,
    Rm.exe. 
    
    NOTE : POSIX commands are case sensitive. Drives and folders are referenced
    differently than in MS-DOS. Windows 2000 and later POSIX commands must use
    the following usage syntax: 
    
    posix /c <path\command> [<args>] IE: posix /c c:\rm.exe -d AUX. 
    
    Usage assumes Rm.exe is either in the path, or the current folder: 
    
    rm -d // driveletter / path using forward slashes / filename 
    
    For example, to remove a file or folder named COM1 (located at C:\Program
    Files\Subdir in this example), type the following command: 
    
    rm -d "//C/Program Files/Subdir/COM1" 
    
    To remove a folder and its entire contents (C:\Program Files\BadFolder in
    this example), type the following command: 
    
    rm -r "//C/Program Files/BadFolder" 
    
    Another option is to use a syntax that bypasses the normal reserve-word
    checks altogether. For example, you can possibly delete any file with a
    command such as: 
    
    DEL \\.\ driveletter :\ path \ filename 
    
    For example: 
    
    
    DEL \\.\c:\somedir\aux 
    
      _____  
    
    Published	 Jun 3 1997 7:28AM 	Issue Type	 	
    Last Modifed	 Dec 22 2001 12:57PM 	Additional Query Words	 3.10 prodnt
    CON PRN AUX CLOCK$ NUL COM1 LPT1 LPT2 LPT3 COM2 COM3 COM4 winnt 	
    Keywords	 kbusage 	
     
    Dion E. Baird
    Network Engineer
    DAS Office of IT
    (503) 932-0861
    dion.e.baird@private <mailto:dion.e.baird@private> 
     
    



    This archive was generated by hypermail 2b30 : Sun May 26 2002 - 11:38:14 PDT