I must be an idiot because I seem to be having a couple of problems that nobody else is having. I'm hoping that Opus 8 is part of the answer.
I have a large folder of 6000 jpegs I got from a supplier of mine. I need to pull out of these the 700 jpegs I need for my website, for the 700 specific products I'll use.
No problem I thought, I'll just go through the manual labor of deleting all the ones I don't need, but I found that the windows file directory doesn't sort them by name in the same order (or the right order to my mind) that an excel spreadsheet does (which has the list of 700 jpegs I want to use). For example the first three files shown in the windows directory sorted by name, and also in Opus 8, are as follows:
sm22.jpg
sm00532A.jpg
sm2102.jpg
Why is the file with leading zeros in between the 2s? When I sort these file names in excel they sort very logically (files with 0 first, then files with 1s and so on). Is there any way to get excel and Opus 8 to sort the file names in the same way so I can line them up side by side and do my deletions?
Better yet, is there any automation tool that would do this for me? I've looked at a bunch of utility file synchronizers but they either sync folders to folders or file content to file content, but not the contents of a folder to a list of files.
Why do I have this apparently unique need? Don't many people need to pull a subset of image files from a large pool of images provided by others?
First you're not an idiot - Opus can be confusing for new users
To address your actual question - the option controlling the sorting is "Numeric order filename sorting". If you select Tools / Folder Options and turn this option off, you will see the filename sorting reverting to how you expect it.
As to why this happens - this option causes Opus to sort the numeric part of a filename based on its actual numeric value, not its ascii value. In your example, this means that "..00532" comes after "..22" because 532 is a bigger number than 22.
Now, to address your actual problem. If you have a file, say "c:\files.txt", and that file contained a list of filenames, one per line, then it is possible to have those filenames automatically selected in the current Opus Lister using a batch file. For example,
@echo off
for /F "tokens=*" %%i in (c:\files.txt) do (
"c:\program files\gpsoftware\directory opus\dopusrt.exe" /cmd select "%%i")
So if you can export your filenames from Excel in this format (one per line, no additional quotes or spaces), then in Opus browse to the folder containing your files, and then create a batch file (either just create a .bat file containing the code above and run it, or create an Opus button set to "MS-DOS batch"), you should be able to speed up the process of manually selecting each of 700 files quite considerably
It didn't work for me when I ran it just as a button from an Opus Toolbar, but works fine as is (as long as there are no spaces in the filenames) if you run it as a batch file from the directory where the files are located. Once the files are selected (make sure the correct 'number' of files are selected first), you can then copy or move them anywhere you want or you can goto Edit->Invert Selection which will select all the files you 'don't' presumably want and then you can delete them or whatever.
I need to go through the tutorial to understand enough about buttons and batch files. I'm lacking some the background knowledge required here, but I'll give it a try and let you know how I make out.
jon... I'm not trying to contradict or anything, but I ran it from a batch file here and it didn't select the folder names I had in the input file which had spaces - although it sure seems like it should have... the call to dopusrt clearly showed the quotes around the variable being passed.
Jeff... you should be able to simply create a file called something.bat in the folder where you've got these files, edit the batch file in notepad, and copy/paste the commands Jon suggested into the file, save and close it. Also copy the list of file names you want into a file at the root of your C: drive called files.txt. The filenames should appear one per line:
sm22.jpg
sm00532A.jpg
sm2102.jpg
etc etc
Save that file, go back to the folder where you saved whatever.bat, and double click on the batch file. Should be a quick done deal...
Tip: If you've copied text to the clipboard using <CTRL+C> (like Jon 'batch code' from this webpage, or the column of filenames from your spreadsheet) you can then just hit <CTRL+V> in a folder somewhere in Opus, and it will automatically copy the text from the clipboard to a file called 'Clipboard Text.txt'. It's a nifty time saver... where you can then just rename the file to whatever you want - like 'jeff.bat' or 'files.txt'.
Reference Jon's batch file example, this is a good illustration of why I tend to use this:
@echo off
for /F "tokens=*" %%i in (c:\files.txt) do (
"c:\program files\gpsoftware\directory opus\dopusrt.exe" /cmd select "%%~i")
instead of this:
@echo off
for /F "tokens=*" %%i in (c:\files.txt) do (
"c:\program files\gpsoftware\directory opus\dopusrt.exe" /cmd select "%%i")
The only difference is the added the tilde character (~) to variable %%i. That tilde strips out any quotes should they exist in the files listed in c:\files.txt. Without doing that the script can fail if c:\files.txt has quoted path names as it results in double double quoted paths.
Don't hit me Jon, you're the best. However just in case yer reaching for a baseball bat, you should know I'm standing behind steje, porcupine, Nudel, tanis, my wife, my kids, and my grandkids.
While Jon's looking for his bat, I actually tried out the batch file and what works best for me is the following script:
@rem BEGIN BATCH FILE @echo off
dopusrt /cmd select none
for /F "tokens=*" %%i in (c:\files.txt) do (
dopusrt /cmd select "%%~nxi"
)
rem END BATCH FILE
The above works whether the files in C:files.txt have fully qualified file names or just file names only (quoted or unquoted). That is file names like:
D:\test folder\source\aaa.txt
"D:\test folder\source\Iowa state bank"
Thank everyone, this saved me a boat load of time. I just upgraded from the trial version to purchase version. For the record I used the code that Jon sent me and it worked fine - my file names had no spaces.
It's gonna take me awhile to learn this program but it's pretty cool.
Good enough then Jeff. Just to wrap this little project up should anyone search this out in the future, to cover all bases, IMHO one should really use this general script as a template:
@rem BEGIN BATCH FILE
@echo off
dopusrt /cmd select none
for /F "tokens=*" %%i in ('type "c:\my files.txt"') do (
dopusrt /cmd select "%%~nxi"
)
rem END BATCH FILE
That should work whether the files in c:\my files.txt contain spaces, quotes, are fully qualified file names, or file names only. And it should also work whether the file name of the file containing the files to be processed is c:\files.txt or c:\my files.txt