up vote 1 down vote favorite
share [g+] share [fb]

I want new folders created on my Windows XP machine to automatically contain a text file.

Is there a way to perhaps add a new context menu on the right click menu which runs some sort of bat file?

link|improve this question
feedback

migrated from stackoverflow.com Aug 14 '09 at 17:59

This question came from our site for professional and enthusiast programmers.

2 Answers

One solution is to write your own 'Create New Folder' context menu item for Windows Explorer. You'd have to dig into the registry to add the appropriate entry to your context menus.

Here's the MSDN article for adding such menu items.

link|improve this answer
feedback

Simply add your BAT file to the SendTo folder in your user profile - i.e. %USERPROFILE%\SendTo. This will add an entry to the Send To menu with the same name as the batch file.

The filename of the item you right-clicked on is passed to the batch file as the first argument.

(In Windows 7 it's not %USERPROFILE%\SendTo - it's %USERPROFILE%\AppData\Roaming\Microsoft\Windows\SendTo)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.