cm_LoadSelectionFromFile: need to ingore characters, how?
Moderators: Hacker, petermad, Stefan2, white
cm_LoadSelectionFromFile: need to ingore characters, how?
Hello everybody, could anybody help me please?
I´m using "cm_LoadSelectionFromFile" but I need to ingore "-" and "space" characters.
In the file.txt is for examle 21 apr350-01-00.* but the filename is 21a-pr3 5001-00.*.
Differences are individual for almost every filename.
Thank you very much indeed.
I´m using "cm_LoadSelectionFromFile" but I need to ingore "-" and "space" characters.
In the file.txt is for examle 21 apr350-01-00.* but the filename is 21a-pr3 5001-00.*.
Differences are individual for almost every filename.
Thank you very much indeed.
Do you need to keep the exact file names? If not I would simply remove the "-" and space chars from the file names with the Multi-Rename Tool and from the selection file.
If you have to keep them you could create an "undo-renaming" batch file first.
It depends a little on how often you have to make a selection and what you're actually trying to accomplish.
If you have to keep them you could create an "undo-renaming" batch file first.
It depends a little on how often you have to make a selection and what you're actually trying to accomplish.
Thank you for your proposal.
But I´m afraid I have no write permision. I´m choosing from the huge database and copy it to my folder. The filenames have to be kept cause they´re linked to each other.
But I´m afraid I have no write permision. I´m choosing from the huge database and copy it to my folder. The filenames have to be kept cause they´re linked to each other.
Last edited by Petas on 2014-12-12, 07:27 UTC, edited 1 time in total.
I would suggest you to replace "-" and " " with "?" or "*" to extend selection mask. But I see completely weird filename in your example with a hyphen in the middle of month name... such one may require to add "*" just after every character. This crazy thing may be done using regex replace "." with ".\*" in most normal text editors. Also removing all "-" from file may be useful here.
No.Petas wrote:Many thanks but searching for more simple solution.
Some modification (rewriting) this command or some script wouldn´t be avaylaible somewhere?
You can have a bunch of file names in the list view
and a list of file names in a text file (or the clipboard)
You have to take care yourself that both can much,
for example by modifying the text file with some search&replace tool.
If you get always the very same problem, you may develop
a script to modify the text file every time the same way.
Therefore you have to provide a common usable rule.
But I doubt you can, as you stated "Differences are individual for almost every filename."
So you have to do some handwork here.
Do you have to keep the filenames yourself or can you just not touch them on the server?
A workaround could be VirtualPanel. Copy the files there, rename, select and then copy them to your disk. The first copy and the renaming is virtual as the plugin name suggests.
A workaround could be VirtualPanel. Copy the files there, rename, select and then copy them to your disk. The first copy and the renaming is virtual as the plugin name suggests.
Hello ZoSTeR,
and thank you very much indeed forf your time.
I´m afraid I´m not so familiar with using Tcmd to install this plugin sucessfully nor haven´t time to learn how.
Would you be so kind and give me some basic instruction?
I have unpacked the file into c:\Program Files (x86)\totalcmd\plugins\wdx\
and add the plugin in configuration/plugin/configure (wfx) - pointed to file VirtualPanel.wfx
When I run VPBatch.exe nothing happens.
and thank you very much indeed forf your time.
I´m afraid I´m not so familiar with using Tcmd to install this plugin sucessfully nor haven´t time to learn how.
Would you be so kind and give me some basic instruction?
I have unpacked the file into c:\Program Files (x86)\totalcmd\plugins\wdx\
and add the plugin in configuration/plugin/configure (wfx) - pointed to file VirtualPanel.wfx
When I run VPBatch.exe nothing happens.
VirtualPanel is a filesystem plugin. It can be reached via the "Network Neighborhood" drive button or issuing a "cd \\\VirtualPanel\" in the command line.
You can install plugins by simply opening the Zip file from within TC. It will come up with an installation dialog.
Under the hood VirtualPanel uses a simple textbased filelist to display its content. It looks something like this:
\VirtualFilename1.txt \\Server\RealFile.txt
\VirtualFile2.exe c:\Dir\RealFile.exe
So besides the Multi-Rename Tool in TC you could even use a texteditor to manipulate the virtual names directly.
Do a Rightclick -> Properties on the VirtualPanel icon for settings and filelist path.
You can install plugins by simply opening the Zip file from within TC. It will come up with an installation dialog.
Under the hood VirtualPanel uses a simple textbased filelist to display its content. It looks something like this:
\VirtualFilename1.txt \\Server\RealFile.txt
\VirtualFile2.exe c:\Dir\RealFile.exe
So besides the Multi-Rename Tool in TC you could even use a texteditor to manipulate the virtual names directly.
Do a Rightclick -> Properties on the VirtualPanel icon for settings and filelist path.
The quickest way I found is the following:
After you have your final file selection in the VirtualPanel, instead of copying it with TC, enter "<explore" into the command line.
From that new window copy the files to their final destination. The copied files will have their original name.
You can display the original/physical name within VP with the custom columns [=tc.path][=tc.fullname] but unfortunately you can't use them inside MRT.
I'm sure MVV has a more elegant solution since he invented the somewhat complex internal VP commands
After you have your final file selection in the VirtualPanel, instead of copying it with TC, enter "<explore" into the command line.
From that new window copy the files to their final destination. The copied files will have their original name.
You can display the original/physical name within VP with the custom columns [=tc.path][=tc.fullname] but unfortunately you can't use them inside MRT.
I'm sure MVV has a more elegant solution since he invented the somewhat complex internal VP commands

You're right, copying from virtual explorer keeps original filenames, but it is more a missing feature (it was difficult to implement) than expected behaviour. But for now it will be useful. Selected files just need to be copied to new folder and then that folder should be opened in virtual explorer in order to select all files and export them.
Unfortunately it seems that TC doesn't support plugin fields in MRT within virtual panel so reversed renaming won't be just that easy...
Unfortunately it seems that TC doesn't support plugin fields in MRT within virtual panel so reversed renaming won't be just that easy...