Forrest logo
back to the del tool

del:tldr:1228c

del: Recursively delete file(s) from all subdirectories.
$ del ${file_pattern} /s
try on your machine

This command is used to delete files from a specific directory and its subdirectories that match a given file pattern.

Here's a breakdown of the command:

  • del: This is the command used in Windows command prompt to delete files or directories.

  • ${file_pattern}: This is a placeholder for the file pattern you want to match. You should replace ${file_pattern} with the actual pattern you want to use. For example, if you want to delete all text files in the directory and its subdirectories, you can use *.txt as the file pattern.

  • /s: This is an option used with the del command to include all subdirectories when searching for files to delete. If you omit this option, the command will only delete files in the given directory.

Putting it all together, the command del ${file_pattern} /s will search for all files in the specified directory and its subdirectories that match ${file_pattern} and delete them.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the del tool