I've been trying to setup a batch script that can be run from the context menu inside a folder. The purpose of the batch script is to populate the folder with a predetermined folder structure.
This will need to be replicated on multiple computers(Windows 7-10), so my idea was to have a network share with two batch files and one .reg file. One of the batch files labeled "install.cmd" would copy the other batch file labeled "Subfolders.cmd" to a folder on the C drive, and run the .reg file to install a shortcut on the context menu to the "Subfolders.cmd" batch file.
I have created the "Subfolders.cmd" batch file and it works, but it has to be run from inside the folder I want the folder structure setup in. I would appreciate any help on how to create the "install.cmd" batch script that would create a folder on the C drive, copy the "Subfolders.cmd" script into it, and run the .reg file to create the item in the context menu that would allow the "Subfolders.cmd" batch script to be run in selected folder.
I'd appreciate any examples and/or suggestions of more efficient ways of doing this. Thanks!
Update: As requested, I have posted the code that generates the subfolders inside an opened folder. It's pretty simple.
md "Folder1" "Folder1/Sub1A" "Folder1/Sub1B" "Folder2" "Folder2/Sub2A" "Folder2/Sub2B"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…