Explorer ShellNew <my folder with template files>

  • Thread starter Thread starter m_r_verhage
  • Start date Start date
M

m_r_verhage

Dear guru,

This message is about the customization of items in the File->New menu
of Windows explorer. Please follow my thought up to the explorer
customization question.

I do a lot of programming in C++. I often need write a new testcase
program to test a specific language construction. To save myself a lot
of writing I made a folder named "template_testcase" that contains
the cpp file and the makefile. Now, when I am about to start with the
new testcase program I copy the template_testcase folder and rename it
to something that indicate the intended test. This is working
reasonable but I want to further automate this process.

I know I can create a new *file* that is based on the template for a
specific extension. Using the process described in:

Add items to the New menu (aka ShellNew entries)
http://windowsxp.mvps.org/shellnewadd.htm

However, I want to create a new *folder* which is based on a template
folder. The template folder contains the C++ source file and the
makefile which has to be copied to the new folder.

After spending some fruitless time in the registry editor it seems like
it is all based on files and not on folders.

Does anyone know if this customization is possible? And how to do it?

Thank you,
Maarten
 
Create a new folder somewhere.
Inside the folder, put the files/folder you want to use.
Go to regedit and add a context menu item and use command :
xcopy.exe "PATH TO YOUR FOLDER" "%1" /E /I

If you know how to add a context menu, great. If you don't know then here is the
way to add a context menu to folders (not when right clicking blank space) :
Open Explorer
Tools - Folder Options
File types tab - Highlight "Folder" (Not "File Folder")
CLick Advanced button
Click NEW
Name it and in application use the command :
xcopy.exe "E:\gAmes & pRogrAms\SETUP FILES\winamp" "%1" /E /I
Click OK > OK

If you later want to change it, here is the way :
Click Start > Run
Type regedit > Click OK
"HKEY_Classes_Root\Folder\shell\Your name\command" > Default
 
Back
Top