Share via

Seeking to delete a file with a too-long filename from the desktop

Anonymous
2021-09-16T18:42:33+00:00

Seeking advice on how to delete a file with a too-long name from the desktop.

There are two traditional ways to do this and neither appear viable:

(1)    Discover the 8.3 name using dir /x and use the del command (https://answers.microsoft.com/en-us/windows/forum/windows_7-files/delete-files-with-long-file-names-without-having/937d2e87-2031-4982-a05b-9cee45c5f883)

(2)    Delete the entire folder containing the problematic file.

DIR /X provides the following information:

08/18/2021  10:31 AM           218,713 APZ          APznzaYEv8iA0gcjfKoDCnia9h1QSr0t9WCnvEYOhQ5fQFJ41MkYEeY0NyWW56ng9HqUb2MJJAnyhxwe-2JFums_wCtxO4KUkqkTh2SdvpwCd-girHVGyiUiiFSl8QbXjykKHNwy1zd_7O11Yc_RUq3UC6HmGlguH2rju9ZWo8Tk0fQG8m8Y1XPMg0mL72iNZ7UEj7JY9y1TO-ExqD2OxUGm81wWkR3Mji2O6b3j36iWSkwRem3rAoO7rto.pdf

But it is not possible to use the DEL command (either by directly specifying the name or by using a wildcard expression):

C:\Users\USERNAME\Desktop>del apz

Could Not Find C:\Users\USERNAME\Desktop\apz

C:\Users\USERNAME\Desktop>del /p AP*

C:\Users\USERNAME\Desktop\APznzaYEv8iA0gcjfKoDCnia9h1QSr0t9WCnvEYOhQ5fQFJ41MkYEeY0NyWW56ng9HqUb2MJJAnyhxwe-2JFums_wCtxO4KUkqkTh2SdvpwCd-girHVGyiUiiFSl8QbXjykKHNwy1zd_7O11Yc_RUq3UC6HmGlguH2rju9ZWo8Tk0fQG8m8Y1XPMg0mL72iNZ7UEj7JY9y1TO-ExqD2OxUGm81wWkR3Mji2O6b3j36iWSkwRem3rAoO7rto.pdf, Delete (Y/N)? y

C:\Users\USERNAME\Desktop\APznzaYEv8iA0gcjfKoDCnia9h1QSr0t9WCnvEYOhQ5fQFJ41MkYEeY0NyWW56ng9HqUb2MJJAnyhxwe-2JFums_wCtxO4KUkqkTh2SdvpwCd-girHVGyiUiiFSl8QbXjykKHNwy1zd_7O11Yc_RUq3UC6HmGlguH2rju9ZWo8Tk0fQG8m8Y1XPMg0mL72iNZ7UEj7JY9y1TO-ExqD2OxUGm81wWkR3Mji2O6b3j36iWSkwRem3rAoO7rto.pdf

The system cannot find the file specified.

Deleting the entire Desktop folder does not seem wise — although I’ve previously used that technique for other folders, such as the Downloads folder (https://answers.microsoft.com/en-us/windows/forum/all/how-to-delete-a-file-with-long-filename-dir-x-to/6cc1666b-86b8-49e5-9c40-89a1fe21fc99).

Advice on other techniques to explore?

Thank you.

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Igor Leyko 110.8K Reputation points Independent Advisor
    2021-09-16T19:37:14+00:00

    Hi,

    My name is Igor, I have 12 Microsoft MVP awards. It's a pleasure for me to help others and I'll do all my best to help you. I'm sorry you have a problems.

    Please try a command del "\?\C:\Users\USERNAME\Desktop\APznzaYEv8iA0gcjfKoDCnia9h1QSr0t9WCnvEYOhQ5fQFJ41MkYEeY0NyWW56ng9HqUb2MJJAnyhxwe-2JFums_wCtxO4KUkqkTh2SdvpwCd-girHVGyiUiiFSl8QbXjykKHNwy1zd_7O11Yc_RUq3UC6HmGlguH2rju9ZWo8Tk0fQG8m8Y1XPMg0mL72iNZ7UEj7JY9y1TO-ExqD2OxUGm81wWkR3Mji2O6b3j36iWSkwRem3rAoO7rto.pdf"

    Was this answer helpful?

    20+ people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-09-16T19:57:05+00:00

    Thank you Igor ... it works!

    C:\Users\USERNAME\Desktop>del "\\?\C:\Users\USERNAME\Desktop\APznzaYEv8iA0gcjfKoDCnia9h1QSr0t9WCnvEYOhQ5fQFJ41MkYEeY0NyWW56ng9HqUb2MJJAnyhxwe-2JFums_wCtxO4KUkqkTh2SdvpwCd-girHVGyiUiiFSl8QbXjykKHNwy1zd_7O11Yc_RUq3UC6HmGlguH2rju9ZWo8Tk0fQG8m8Y1XPMg0mL72iNZ7UEj7JY9y1TO-ExqD2OxUGm81wWkR3Mji2O6b3j36iWSkwRem3rAoO7rto.pdf"
    
    C:\Users\USERNAME\Desktop>
    

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments