How can I rename a file title that contains "/" without creating a new folder, simply by ignoring it

Hello, everyone. When renaming files in Directory Opus, if the name contains a “/” character, it will automatically create a new folder. How can I avoid this situation, just ignoring this "/" ? I often need to copy names to rename files, and these names may contain multiple “/” characters. It’s very troublesome to manually delete the “/” characters every time. Thanks for the guidance.

1 Like

Preferences / File Operations / Renaming Files / Control Keys can remove/replace any character, e.g.

RegExS(valstem, "[/|\\]", "") + valext
XML
<?xml version="1.0"?>
<regexsel key="ctrl+shift+7" name="Remove Slashes">
	<eval>RegExS(valstem, &quot;[/|\\]&quot;, &quot;&quot;) + valext
</eval>
</regexsel>

How to use buttons and scripts from this forum

Thank you for your help, please forgive my ignorance, this seems a bit complicated for me. Is it set up this way?

Copy the xml code above and clic 'Paste' in your screen capture.
The new "Remove Slashes" will be create.
Then use ctrl+shift+7 whiling editing file name.

Is it that my operation is problematic, as there are still errors in the “test name” section?

The XML code needs to be pasted via

That's great, the “test name” part is now working properly when testing. But when I pressed the specified shortcut key, the renaming action wasn't triggered. Please forgive my ignorance once again. Is there something wrong with how I'm using it?

Yes :slight_smile:

Go into Inline Rename mode, press and hold Ctrl.

Is the new key listed in the pop-up?

If it is, but doesn't work, try a different key.

The problem has been solved according to your method. I really appreciate your guidance.

1 Like

Happy de-slashing! :slight_smile:

1 Like