Reverse of 'Copy File Names', Paste from excel into file name

I suppose I should make an introduction as the first post.

Commodore Vic20 user back in about 83, then upgraded to Atari 1040 STE, MegaSTE, added Mac's to the mix early 90's and used both till the end of the decade, retired the Atari's been Mac's as main machine since. Used PC's with Windows 3.1-95 early/mid 90's but never had a PC until I started building/playing with a few Windows PC's in about 98. Never liked Windows, was ass about face back then and it's barely improved now.

Interesting how, as we were kids, the ones who had Amiga's evolved (or de-evolved) to Windows machines, and all the Atari kids ended up with Mac's.

Anyway, Professionally, have to use Windoze PC's for 3D design, kinda like acid in the eye balls using Windows compared to macOS.

Thankful that, finally Directory Opus has expandable folders in List view, like macOS has had since like System 6 circa 1990. Many times I was looking for 3rd Party file managers including DO but nothing on this platform had expandable folders in List view, until I did a renewed search about a month ago. Awesome file manager, see on Windows it always seems to take developers from other platforms to develop applications that think differently and a few guys seem frequently put trillion dollar corporations to shame, so big up, and Aussies too..nice! Nice forum too.

So to my query.

'Copy File Names' is a valuable ability.

I'm wondering if there's some capability to perform the reverse of this, with some control?

Visualise if you can, File Names (AutoCAD dwgs product components) are named as description with 12 characters at the end being the product code, example:

Ledger 0.60m 01.03.060.00.dwg
Ledger 0.65m 01.03.065.00.dwg

An excel sheet has been provided with all the new product codes in columns next to product description.

The task is to replace the code in hundreds of file names example replace '01.03.060.00' with
'URL0600'.

I'm thinking maybe copy product code text in the cells of the excel sheet, then select the files in DO to paste them into the file names of files.

There'd need to be a condition for this, replace 12 characters from the end of the file name with (what ever is in each cell on clipboard).

It'd be faster than manually copy/paste into each and every file, probably around 1,000 files.

Any DO options or Ideas or 3rd party possibilities??
It's likely someone out there has had to do something like this in the past huh?

Yes.

Advanced Rename

If I understood correctly, the problem is the inverse; the files are named with the product code, and this is the part to replace with ids coming not from files but from an excel sheet.

@FromTheEdge : Correct me if I'm wrong, but here's what I understand:

Some excel sheet says:

Product Code Alias
01.03.060.00 URL060
01.03.065.00 URL065
01.03.070.00 WHATEVER1234

And what you want is to be able to rename files that end with a known product code by replacing that code with the alias from the sheet?

EDIT: If so, is that product code table changing often? How big is it?

Welcome @FromTheEdge

This does not answer your immediate question. The number of Product Code-Alias pairs and using Advance Rename will resolve that in all likelihood. Answer @PassThePeas and you will get an excellent answer.

If you want to get a sense of the power of Directory Opus, see
Source Menu for Directory Opus 13.

Hi all,

The answer to, will the codes change regularly. Answer is no. The reason is we used to buy the components from a manufacturer, but had issues with constrained and delayed supply so we decided to manufacture our own thus removing a middleman in the supply chain. The are all dwg 3D parts for assembly which yields us bill of materials.

Since files are named 'description' SPACE 'size' SPACE 'code' (& .dwg extension) example:
Ledger 0.60m 01.03.060.00.dwg
Ledger 0.65m 01.03.065.00.dwg
Ledger 0.84m 01.03.084.00.dwg

I'm hoping to use the 'space' to delineate, so that the paste in excel places the 3 sections in their own cell columns. This is the task to solve and this is the first part.

My source excel sheet has the new codes in their own column cells. So i'd just need copy the column cells containing the new code and paste into the column cells with the old code. This sets me up for the next stage.

Now that i'd have 3 cells, the right most cell with new codes:
Ledger 0.60m URL0600
Ledger 0.65m URL0650
Ledger 0.84m URL0840

I'd copy all that text above, and I tested this already,


This will be the source of the new copy to the filenames:

DO Rename, Clipboard button 'paste new names from clipboard, does indeed paste to the filenames even though the source text was in different cells...awesome...I did notice on the sample test that the second file name had two spaces before the code though, easy enough to ID and fix manually, but the bulk time consuming work is done rapidly.

To conclude, need solution so that the clipboard filename copy from DO can paste in 3 cells.
Otherwise im still stuck manually copying individual codes and pasting into the same cell for every filename. So can DO's copy filename be configured as described?

Here's a sample screenshot of a folder of parts, naming convention:

If you're familiar with scripting (JScript or VB Script), the shortest way is to build a rename function that will:

  • Find the last part of the file name (using a regular expression, or even just looking at the last 12 characters)
  • Have a dictionnary (map in Opus object model) that matches codes to their translation
  • Build the new name by making the replace

If you're not, I would advise to build an excel sheet where you'll be able to enter your filenames (copied from Opus with CTRL+SHIFT+N).
You'll have to make a formula to extract 1) the extension and 2) the 12 digits code.
Make a table in a param sheet with the codes & names, and make a formula to replace the code with its name (VLOOKUP, XLOOKUP, whatever).
Once the filenames are copied, you'll get instant target names (do not include the extension). Copy that to clipboard then enter the Rename dialog and paste new names from clipboard.

EDIT: A quick draft of what the Excel translation sheet could be (you'd have to add all the codes):
Translate Codes.zip (9.8 KB)

Thanks all for suggestions.
I found the solution in Excel, it has in the Data tab or Ribbon, 'Text to Columns' a 3 step wizard, remember those from Win 95, 'wizards' lol.

Select all the cells of the copied filenames from DO, select Delimited, (it shows a preview of selected data) click Next, Step 2, choose 'space' as the delimiter, click Next will complete the operation resulting in exactly what's desired, then select all the text in each of the cells and use that Clipboard button in DO's Rename 'Paste new names from clipboard'.

Excellent workflow, no no...sooperb!!!



Interesting observation, the excel sheet I ran this on, seems to now automagically delimitate successive filename copies from DO, so seems like only need to run the Text to Columns once in a session.