Saturday, November 10, 2012

Windows context menu – Flag directory

So I’ve been looking for a while an option to flag a directory with “Moved” folder.

Why would I need it? Well, for example, when downloading a torrent files, I would like to move some of the content but in the same time to keep the originals for seeding. So in order to remember what was moved and what wasn’t I would have to:

1. Create a new folder
2. Rename it to some name, like “Moved”

The fastest way to do this is by Ctrl+Shift+N and renaming.

Sounds simple, but when doing it a lot you start thinking about automation.
So here is a simple code which can update your registry to add 2 options:

1. Right click on any folder on the Windows Explorer side bar would have “Mark Moved” entry

2. In the right click menu inside a folder, New menu would have “Mark Moved” entry


Copy the following to a text file, rename .txt to .reg and run.

Windows Registry Editor Version 5.00
"Command"="\"CMD\" /D /E:ON /c for /F \"tokens=*\" %%a IN (\"%1\") do md \"%%~dpa\\Moved\""
"FriendlyTypeName"="Mark Moved"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Mark Moved]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Mark Moved\command]
@="CMD.EXE /C MD \"%1\\Moved\""

The information was merged form the following two sources:

Next steps would be to add an icon to the explorer toolbar or ribbon.

Tested on Windows 8.

No comments:

Post a Comment