Cannot delete file with name ended with a dot.

Discussion in 'Windows Server' started by rmari, Jun 8, 2009.

  1. rmari

    rmari Guest

    Hello,
    when trying to delete from File Explorer a file I receive the message "Could
    not find this item", also cannot delete from command prompt when try I
    receive the message "File Not Found" (from command prompt I cannot see the
    file when I type the command "dir", I can see it if after the command dir I
    type the initial of the file's name and press the key "tab").
    The operating system is Windows 2008 server standard x64.

    Thank You,

    Best Regards

    Roberta
     
    rmari, Jun 8, 2009
    #1
    1. Advertisements

  2. rmari

    rmari Guest

    Hello Dominiki,
    Have you disable "Hide extensions for know file types" on File Explore?
    Because if it is enable I could'n create a file with name ended with a dot.
    The filename si "Verbale.".
    I could'n use jolly characters in the command line because doesn't works,
    example:

    del *.* -> response: nothing
    dir V + press tab button -> dir Verbale.
    del V + press tab button -> del Verbale. press enter -> Could Not Find
    path\Verbale.

    and in File Explore I can see again the file.
    seemingly everything is correct, no errors on event log and no errors on
    chkdsk's log.

    Thank you

    Roberta
     
    rmari, Jun 8, 2009
    #2
    1. Advertisements

  3. Hello rmari,

    How deep is the structure where the file is located, more then 255 characters
    including the folder structure?

    Best regards

    Meinolf Weber
     
    Meinolf Weber [MVP-DS], Jun 8, 2009
    #3
  4. Your problem is caused by the trailing dot in the file name. Windows does
    not allow it and cannot cope with it when it exists. A moment ago I created
    such a folder artificially and found no method to subsequently access,
    rename or delete it. I can see the following options for you:

    a) Find out which application created the folder, then discuss the issue
    with the supplier.
    b) Use a disk editor (e.g. DiskEditor from Acronis) to turn the trailing dot
    into a character.
    c) Live with the problem.

    Note that chkdsk will not resolve the issue.
     
    Pegasus [MVP], Jun 8, 2009
    #4

  5. Roberta,

    I posted earlier, but it didn't show up. Possibly didn't post because of
    references I have in my post. I am reposting it without the references.

    ----
    Roberta,

    Please read my following blog on this:

    ======================================================================================================
    ======================================================================================================
    To delete those undeletable files and folders:

    A little background on undeletable files and folders:

    I've seen these in the past regarding 'pubbed' FTP servers by illegal
    software,
    game and movie files that find open FTP servers. They would upload their
    files to it but use characters in the name that FTP supports (ASCII
    characters) as well as create a very deep file structure with unreadable or
    printable ASCII characters, and/or file names with these characters that are
    greater than 256 characters. Windows directly supports ANSI characters.
    However, although Windows supports ANSI indirectly, it is not supported
    directly through the Windows Explorer GUI. Therefore this prevents admins
    from getting to them or deleting them, nor delete them. In the older
    operating systems, you could install the POSIX support tools (to support
    UNIX based commands and using ASCII characters), but that is gone now.
    However Windows still provides POSIX support but not directly, however they
    can be deleted by using specific commands, but you just have to know the
    commands!.

    So the other factor, as mentioned, is if the file, folder name, and/or
    number of child folders is greater than 256 characters. Many operating
    system limits are based on the i386 addressable 32bit architecture, such as
    the number of useres that can access a share, which is 4.3 billion objects.
    It also depends on the drive and if an app can read it. Many programs also
    expect a limit of 256 objects (characters, paths, bytes, etc), maybe even
    the deltree command is limited, however NTFS formatted drives can go beyond
    the 256 objects.

    Is the drive NTFS?

    Therefore, not being able to delete them is caused by the factors above,
    special characters, trailing spaces, trailing dots (periods) or reserved
    names in the folders, such as com, lpt, etc, such as when a machine gets
    'pubbed' into an FTP site where the 'pubbers' will create these deep paths
    and using reserved names to prevent the admin from deleting them. If someone
    created the file or subfolders with these characters,
    it will give you headaches to remove them. With an FTP app it's easy to do
    this, because they use ASCII characters, such as what POSIX uses, however
    WIndows uses ANSI and cannot translate the folders. In the past we had to
    install the POSIX support on an NT4 machine to clean up such folders and
    files.

    Try the following:

    Assuming the first folder is the numeral "1" on D drive (and use the quotes
    if you have problems and watch the required periods if the command uses it):

    rm -r "//D/1"

    or

    RD \\.\c=D:\1

    or

    RmDir \\.\D:\1 /s /q


    RmDir \\.\C:\YourFTP_ROOT's_PATH\COM1 /s /q

    Read the following references for more information and instructions.

    How to Remove Files with Reserved Names in Windows:
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q120716

    You cannot delete a file or a folder on an NTFS file system volume:
    http://support.microsoft.com/kb/320081

    Cannot Delete Files or Folders with Extended Characters:
    http://support.microsoft.com/kb/131702
    ======================================================================================================
    ======================================================================================================


    --
    Ace

    This posting is provided "AS-IS" with no warranties or guarantees and
    confers no rights.

    Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSA Messaging, MCT
    Microsoft Certified Trainer


    For urgent issues, you may want to contact Microsoft PSS directly. Please
    check http://support.microsoft.com for regional support phone numbers.

    "Efficiency is doing things right; effectiveness is doing the right
    things." - Peter F. Drucker
    http://twitter.com/acefekay
     
    Ace Fekay [Microsoft Certified Trainer], Jun 8, 2009
    #5
  6. rmari

    rmari Guest

    Hello All,
    thank you for your helps!

    Meinolf,

    the directories structure is deep 4 level and is less of 255 characters.

    Pegasus,
    I know...
    the action which created the file on the server is a copy of user profile
    with robocopy (I don't know which applications in the client has created the
    file...)

    Are you sure about resolution with disk editor?

    :

    ACE,
    thanks for your explanation,the file system is NTFS and I tried the above
    command (I received the message: The system cannot find the file specified.)
    but the file is again on the disk.

    I will follow the MS's documents.

    Thank you for now.

    Roberta
     
    rmari, Jun 8, 2009
    #6
  7. Yes. However, you should try Ace Fekay's suggestions first.

    By the way - robocopy is unlikely to have caused your problem - it merely
    propagated it from the user profile you copied.
     
    Pegasus [MVP], Jun 8, 2009
    #7
  8. Roberta,

    Take a look at this article to remove the file:

    How to Remove Files with Reserved Names in Windows
    http://support.microsoft.com/kb/120716

    Ace
     
    Ace Fekay [Microsoft Certified Trainer], Jun 8, 2009
    #8
  9. Also, try this:

    DEL \\.\c:\somedir\filename.

    Ace
     
    Ace Fekay [Microsoft Certified Trainer], Jun 8, 2009
    #9
  10. rmari

    rmari Guest

    Thank you!!

    Ace, I tried this:

    RmDir c:\<directory> /s /q

    has worked!!!

    Thank you all for your helps.

    Ciao

    Roberta.
     
    rmari, Jun 15, 2009
    #10
  11. Good to hear. You are welcome, Roberta!

    Cheers!

    Ace
     
    Ace Fekay [Microsoft Certified Trainer], Jun 15, 2009
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.