I have some templates for C++ classes (one .h and one .cpp file) for which I now have custom Visual Studio wizards. But they're a pain to maintain so I'd prefer to replace them with XYplorer scripts somehow.
What I need: when I click somewhere, I need to enter the class name, and then two files should be copied from a well-known directory into the current XYplorer directory. It should do a search/replace within the new files, and replace a well-known placeholder value with the class name I just entered.
What is the easiest way to go about this?
Creating multiple files using the 'new item' menu
Re: Creating multiple files using the 'new item' menu
Not possible via "new item" menu
Write a script and put that in a catalog entry, in a popup menu, toolbar button and / or assign it to a keyboard shortcut...
Write a script and put that in a catalog entry, in a popup menu, toolbar button and / or assign it to a keyboard shortcut...
One of my scripts helped you out? Please donate via Paypal
Re: Creating multiple files using the 'new item' menu
OK thanks - is there a way to do search/replace in XYplorer script, or do I just revert to batch files?
Re: Creating multiple files using the 'new item' menu
Directly in a file without reading it's content first? No.
Script commands: replace / replacelist / regexreplace are your options
To efficiently replace content in files without reading their content,
I personally use https://sites.google.com/site/regexreplace/
(e.g. from XY scripts as well)
Script commands: replace / replacelist / regexreplace are your options
To efficiently replace content in files without reading their content,
I personally use https://sites.google.com/site/regexreplace/
(e.g. from XY scripts as well)
One of my scripts helped you out? Please donate via Paypal
Re: Creating multiple files using the 'new item' menu
And?
One of my scripts helped you out? Please donate via Paypal