Page 1 of 1

Filename Begins with tilde

Posted: 09 Aug 2024 18:56
by riker45
When I open some folders, some of the filenames begin with a tilde (~) and dollar sign: ~$employee. It doesn't happen with every folder, just some of them. I am not caching folder sizes. How do I get rid of the tilde and dollar sign? Thanks

Re: Filename Begins with tilde

Posted: 09 Aug 2024 19:11
by highend
And you are sure these are real files?
E.g. MS Office uses this prefix for temp file creation of opened files...

If yes, e.g. with a script...

Code: Select all

    $items = quicksearch(">^~\$.* /f", , , "s");
    end (!$items), "No file(s) with '~$' prefix found...";

    foreach($item, $items, <crlf>, "e") {
        renameitem(regexreplace(gpc($item, "file"), "^~\$"), $item, , "-01");
    }
    status "Finished...";