Code for Concinnity

beautiful and elegant solutions


cmd-recycle: Delete files from Windows command line

Download links

I wrote another tool to do just this a while ago, but that one stopped working since I migrated to Windows 7 x64. Microsoft said the SHFileOpearation interface (which the old tool used) had been replaced by the IFileOperation interface. So I figured I would dig up my rusty C# again to update it.

Damn, I can’t believe it took a couple of hours, but the result worked amazingly. This one also supports wildcards:

1
recycle file1 file2 supports-wildcards\*.tmp

I’ve gone the extra mile and set up a proper repository this time around on GitHub. Probably some Windows gurus will mock me left and right with some obscure one-liners or something, lol.

Published by kizzx2, on January 6th, 2010 at 3:30 am. Filled under: Useful tips Tags: , , No Comments

Starting Windows’ Network and Sharing Center from command prompt

It has always looked not-so-cool to have to type “Sharing” at the start menu or worse yet, navigate through the Control Panel just to start it. Today I finally dug out how to do it from TechNet:

1
control /name Microsoft.NetworkAndSharingCenter

Looks like Microsoft decided to go down the verbose path. Maybe I’ll just stick with the old ways :p

Published by kizzx2, on December 29th, 2009 at 9:21 pm. Filled under: Useful tips Tags: , , , No Comments