How to delete files/subfolders in a specific directory at the command prompt in Windows

Say, there is a variable called %pathtofolder%, as it makes it clear it is a full path of a folder. I want to delete every single file and subfolder in this directory, but not the directory itself. But, there might be an error like ‘this file/folder is already in use’… when that happens, it should … Read more

I want to delete all bin and obj folders to force all projects to rebuild everything

I work with multiple projects, and I want to recursively delete all folders with the name ‘bin’ or ‘obj’ that way I am sure that all projects will rebuild everything (sometimes it’s the only way to force Visual Studio to forget all about previous builds). Is there a quick way to accomplish this (with a … Read more