Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

2 Answers 2

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.

share|improve this answer

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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