-3

I want to delete files and folders from a folder by using cmd in windows.How can i do?

And i need to copy a file and paste appending timestamp by time.

Help will be appreciated

Thanks!

Sree
  • 7
  • 6

1 Answers1

0

To delete all files and subfolders in directory, You can use powershell:

powershell -Command "Remove-Item 'path\to\directory' -Recurse -Force"

  • path\to\directory is the place from where You would like to delete those files.

Or:

del /q "path\to\directory\*"
FOR /D %%p IN ("path\to\directory\*.*") DO rmdir "%%p" /s /q
KarlR
  • 1,545
  • 12
  • 28