Coverart.jpg

Hi guys,

I have been using the code below to convert album cover images to coverart.jpg files using Opus 9 and it worked fine every time.

Image CONVERT=jpg HEIGHT=256 WIDTH=256 PRESERVEASPECTRATIO HERE AS=coverart.jpg REPLACE=ALWAYS Select DESELECT coverart.jpg Delete QUIET attrib +H coverart.jpg

I don't know where this has come from and I don't fully understand it. Some how it seems wrong!!!

Anyway, it no longer works properly with Opus 10. The selected image gets resized and converted but the hidden attribute is ignored.

Any ideas or better ideas...?

Regards

Roly

Does it work if you define it as an MS-DOS Batch Function? Attrib is a DOS command.

Regards, AB

So the problem is, the hiding doesn´t work anymore? You could try to add coverart.jpg to your
global wildcard filters (hide filters) in -> preferences -> folder display -> global hide filters.

There may be other ways but the hide operation seems to work if you make it an MS-DOS button and use the command.

attrib coverart.jpg +h

Regards, AB

You can use the SetAttr command to change file attributes.

Cheers for your responses guys. As aussieboykie suggested, changing it to a DOS command did the trick. Good shout as well abr, I will consider adding it to my hide filters.

You don't need to use the DOS attrib command since Opus has the built-in SetAttr command which Jon mentioned.

It'll probably be fine in this case but DOS stuff is best avoided where possible since it often falls over with unicode or UNC paths.

I would rather avoid using DOS where possible but I can't figure out how to add the Setattr command to the code.

Can you help me with this one please?

Try SetAttr TOGGLEATTR=h

Excellent, that works. Thanks abr.

Image CONVERT=jpg HEIGHT=256 WIDTH=256 PRESERVEASPECTRATIO HERE AS=coverart.jpg REPLACE=ALWAYS Select DESELECT coverart.jpg Delete QUIET SetAttr TOGGLEATTR=h coverart.jpg
I still don't fully understand line 2 of the code above. Can someone explain please?

I suppose, that the coverart.jpg will get selected additionally to the image you are converting, so the deselect will
avoid the deletion of that newly created image. You could make a test folder, where you run that code without the
line in question, to see if that is the case (or test wise remove the quiet argument to see, which files are going to
be deleted).

Tested and it works precisely as described. The original image remains where previously it would be deleted. The "Select DESELECT" part of the command puzzled me but I assume there is no Deselect command as such, it's part of the Select command.

Oh, ok, that´s what you meant. Yes, there is no single DESELECT, as there is also no single MOVE (which is COPY MOVE).

Of course, common sense should have told me that. All makes sense now anyway. Thanks a lot for your help abr, much appreciated.