Microsoft Word creates hidden files that start with ~xxxxxx. Normally you cannot see them, but I save these files in my local Google Drive folder, which uploads the files online to my Google Drive account.

On Google Drive, whenever I go into a folder that contains .docx files, I see all sorts of garbage files that I have to manually delete, and .docx files are everywhere.

With Command Prompt, or even Powershell, how would I go about doing that. I think you can use powershell but I am no Powershell expert.

1 Answer 1


Powershell is a bit overkill for this task (plus it introduces the possibility that you may accidentally have it expand ~ to your home directory; not good. cmd.exe won't do that.)

Just go into the command prompt, cd to the directory where your ~xxx files are located, then run del ~*. Wildcards.

  • You can add /S to do subdirectories.Cool. So now all I have to do is del ~* /S and bye-bye garbage Feb 4, 2017 at 2:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .