16

I have a drive filled with 1000's of files spread across hundreds of folders. I was using a sync program that created many placeholder files throughout the drive. I need to delete all the placeholders but leave the folders and other files intact. I am using Windows 7.

3 Answers 3

29

I found my own answer at the command line.

del /s *.wlx

where wlx is the file extension in question.

5
  • 2
    If I have files called "ASP" and "ASPX" and runs this, it also deletes the ASPX pages... Just saying - its not the "specific" extension Feb 3, 2014 at 9:21
  • You could add the /p switch to prompt on every delete. That said, hitting y enter over and over again gets old fast.
    – PerryC
    Jan 16, 2016 at 20:48
  • @LarsHoldgaard: The "short name" version of the filename for those ASPX files likely does have an ASP extension.
    – Ben Voigt
    Jun 13, 2016 at 14:04
  • Powershell: ls *.wlx -Recurse | foreach {rm $_} Jan 19, 2017 at 0:37
  • Note: the usage of /s is to Delete specified files from all subdirectories.
    – MendelG
    Mar 30, 2021 at 21:38
7

You can do this using the Windows GUI. Enter "*.wlx" in the search box in explorer. Then after the files have been found, select them all (CTRL-A) and then delete using the delete key or context menu. This also works in older versions of Windows using the separate explorer file search pane and window.

The command line is faster, especially if there are a lot of files. I've just added this answer for the record.

1
  • I actually tried this first since it is the easiest way to remove these files. The command line method works great for many files but it has the potential delete the wrong files if you are not careful. Aug 25, 2010 at 13:39
0

If you have cygwin -

find . -name '*.wlx' -delete

You must log in to answer this question.

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