6

I know the filename, say myfile.pdf. But I do not know its location because my web application created it temporarily. When the user disconnect from the application then I want this file to be deleted. So how to search and delete the file?

aschipfl
  • 33,626
  • 12
  • 54
  • 99
pheromix
  • 18,213
  • 29
  • 88
  • 158

2 Answers2

4
del path\filename /s

e.g.

del c:\test\h.bat /s

Will delete h.bat in any sub folders from the test directory.

To search and delete on an entire drive: -

del c:\test.bat /s

The S switch deletes all specified files from all subdirectories.

Gary
  • 1,086
  • 2
  • 13
  • 39
0

You can delete files by using this command.

  • rm [filename]