In software development, it is quite often to put files of same kind into the same folders. A file in one folder has to work with a file in another folder to work together.
In my example, a comment controller needs the following 6 files to work together.
ControllersCommentsController.cs DataCommentContext.cs DataCommentRepository.cs InterfacesICommentRepository.cs ModelsCoreCommentCommentEntity.cs ModelsCoreCommentNodeComment.cs
There are in different folders. I now would like to make a new controller from coping this files. I can do this one by one. But it’s inefficient and easily leading you to mistakes.
With total commander, this can be done quite easily.
Firstly, create a temp empty folder and open it in the right panel of total commander.
Then open the source code folder in the left hand panel
Shift+F12 to bring up the sync tool. Put *comment* in the filter box, uncheck Empty directories, then click compare
You will see all the files you needed listed. Now click Synchronize to copy over all the files from left to right, the folder structure will be copied as well.
Once done, close the sync tool
Files are now copied, now let’s rename them.
Click on the right hand panel and Ctrl+B to list all files (not folder) ,Ctrl+A to select all files, then Ctrl+M to bring up the rename tool.
In the “Search for” box, put Comment; and in the “Replace with” box, put Subscription, because I would like to create a Subscription controller.
Then click start when everything is ready.
Then all the files will be disappeared in the rename tool, click “Close” to close it.
Now you can see all your files are renamed.
We also need to rename the folders.
Press Ctrl + B again to come back to norm directory view.
Then press Alt+F7 to bring up the search tool, put comment in “Search For” box, then click “Start search”, the search result will appear. In my case, there is only one folder found.
Click “Feed to listbox” to list it on right hand panel, Control + A to select all, then Ctrl + M to bring up the rename tool.
Same as files, but this time, you don’t need to enter anything as it remembers what you put last time.
Click start, then close the dialog.
Before sync back to the source code folder, it’s better to do some batch editing for all these files. It’s off topic. I will skip it here.
Now let’s press Shift+F12 to bring up the sync tool again. Make sure Asymmetric is not checked. Then click Compare and Synchronize
Press OK and close the sync tool, you are done.