Pages

Showing posts with label Windows 7. Show all posts
Showing posts with label Windows 7. Show all posts

Wednesday, October 2, 2013

Batch - Deleting all the files and directories under a root directory

Hi!

With Windows 7, I need to delete all the files and subdirectory under a root directory.

I was able to achieve this task with theses two commands in a batch script

rmdir /S /Q MY_DIRECTORY
md MY_DIRECTORY

The first one deletes all the files and directory under MY_DIRECTORY but it deletes also the root directory. I recreate after the root directory.

It may not be the best way to achieve this but it works.

Tuesday, October 16, 2012

Remove all Ruby Gems in one command


  • Open the command manager
  • Type powershell
  • Type gem list | %{$_.split(' ')[0]} | %{gem uninstall -Iax $_ }