Weird characters turn up in filenames like ?o220E?|

Dunno what this is, but a few times I have seen file names like:

?o220E?|Book Name.pdf

  • The weird characters are not there when you try to inline rename them.
  • Rename regex find/replace [^\x00-\xFF]+ to BAD doesn't find them
  • A simple [F5] Refresh gets rid of them too.

Maybe something to do with copying files to my Android phone?

Thank you for your attention,
Trev

They are part of Opus' internal naming scheme (mostly for FTP and MTP connections, I think). They might be temporarily visible in ghost files (Preferences / File Operations / Copying Files / Show ghost files for queued copies) or appear when handling paths with a script.

Can you give a list of steps to reproduce what you've seen?

Yeah this is definitely something to do with MTP and the Android phone.

Just copying files from the hard disk to the phone. Not every copy, but occasionally one will have that character in it.

Trying it again for quite a while and nothing happened. But then I noticed that the EventTabAddParentname.js.txt (suggested by lxp for my +1 parent in tabs post) here: Consulting - #4 by justin always displays those characters in the tab:

mtptab

And by strange coincidence, the next file I copied was that js.txt file to the phone, and it displayed the character:

image

So I don't think I did anything special, just copying the odd file to my phone. I can't say that my experience with copying files to the phone in general has ever been totally flawless (well compared to say, a USB drive).

Maybe S10 is just too old? Phone driver problem? Has MTP been updated recently?

File is definitely there and it all works, it is just cosmetic.

1 Like

This version of the script will fix the tab label:

function OnInit(initData) {
    initData.name = 'TabAddParentname';
    initData.version = '2021-10-11';
    initData.url = 'https://resource.dopus.com/t/consulting/39552';
    initData.desc = 'Add parentname to tabname';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAfterFolderChange(afterFolderChangeData) {
    if (!afterFolderChangeData.result) return;

    var tab = afterFolderChangeData.tab;
    var srcPathFirstLetter = String(tab.path).substring(0, 1);

	var fsUtil = DOpus.FSUtil();
    var newTabName = fsUtil.DisplayName(tab.path);
    if (srcPathFirstLetter != ':' && srcPathFirstLetter != '/') {
        var vecPath = fsUtil.NewPath(newTabName).Split();
        var k = vecPath.count;
        var newTabName = (k > 2 ? vecPath(k - 2) + '\\' : '') + vecPath(k - 1);
    }

    if (newTabName == tab.displayed_label) return;

    var cmd = DOpus.Create().Command();
    cmd.SetSourceTab(tab);
    cmd.RunCommand('Go TABNAME="' + newTabName + '"');
}

If you ever find a way to reliably reproduce the copied filename problem please let us know.

1 Like

I had this happen today, and it's why I'm here. Win 11 / Directory Opus 13.1 and I'm copying a list of files from Everything 1.4.1 to my tablet. These are EPUB book files from my Calibre library going into an SD-card folder so I can read offline.

The first few files I copied came up like this while the file was selected in the DO window showing the tablet folder, but the leading characters disappear when the file is not selected. There's nothing in the file properties to explain it.

?o245D?|Assume the Worst - Carl Hiaasen.epub

(The code is different for each file - I copied this from the 'rename' feature in DO which was the only way to see the full text - F2 just showed me the correct filename.)

I copied another long list of 30 files, but only the first 5 filenames behave like this. The rest show the correct filename without a prefix.

It's not a major issue - if I don't select the file, I can't see the code, and my reader doesn't show it, only DO. It's just weird...

Can you give the exact steps to reproduce what you're seeing?

OK - revisited the previous folders where I had seen these prefixes: all I now have is standard file names. Tried process again -

  1. Open a lister instance to my desktop SSD Calibre library storage
  2. Open a separate lister instance to my tablet SD card Books folder
  3. Create a new sub-folder called "test"
  4. Copied* 9 books from SSD to tablet
  5. All show prefixes while still highlighted
  6. Select one file and they all still show prefixes
  7. View a different folder and return - and all the prefixes are gone

-all within Opus windows

-These were all small(ish) book files <5MB - repeated the same process with some ~200MB video and audio files. No prefixes seen - standard file names all the way. Odd.

*Edit - drag-n-dropped