Help with a button

Following button doesn´t work, unless i don´t use the lower four lines:

CLIPBOARD COPY
@set fdate={date|dd'-'MMM'-'yy}
Go "L:\drums\newdrums"
CreateFolder Name "drums {$fdate}"
CLIPBOARD PASTE
Go UP
select all
Properties Setcolor=normal
Properties FILE="L:\drums\newdrums{$fdate}" SETCOLOR="bold"

The first 5 lines work, although i´d like to have a more elegant solution, without CLIPBOARD COPY / PASTE.

Basically this is the task:

  • select files from anywhere
  • Copy Update them without asking (FORCE? QUIET?) to a folder with the current date, inside the folder named "newdrums".
  • all folders colors to be reset, only the current one should have Setcolor="bold".

Also, I imagine that you don't really need to define a color named "normal", just use this instead.

@set DestPath=L:\Drums\NewDrums @set NewFolder=Drums {date|dd'-'MMM'-'yy} Copy TO="{$DestPath}" CREATEFOLDER="{$NewFolder}" FORCE WHENEXISTS=rename Properties FILE "{$DestPath}\*" SETCOLOR=!reset Properties FILE "{$DestPath}\{$NewFolder}" SETCOLOR="bold"

EDIT: By using SETCOLOR=!reset, (instead of SETCOLOR="normal") the folders in question will not be added to the colored folder list in preferences, and they will pick up the standard folder colors you have set in Preferences.

EDIT: For other users, use the code I have posted later in this thread, in order to workaround an issue with this type of command:

Copy TO="<somepath>" "CREATEFOLDER="<somefolder"

Currently, with the command above, Opus will only copy the first selected file to the new folder. This issue has been reported to GPSoftware.

Thank you, this looks good. But there is still two problems.

  • the older "bold" style folder remains bold (it´s supposed to be reset to "normal"), the new folder won´t be set "bold".

  • the folder will be created, but only the first file will be correctly placed inside that folder, all other files will end up one level higher (above the newly created date folder).

Make sure you have defined the color "bold" and "normal" under:
Preferences - Favorites & Recent - Folder Colors - Color List

Yep, i have both colors defined. Sorry, i had one slash to many, now it works. But the other thing is still not working, only the alphabetically first file will be placed in the new folder.

That would be a bug. And I'm reporting it.

Actually, I already reported this bug last week, and I even documented a workaround.

Okay, use this instead. Note the edit I made to the first button code above. You most likley do not need a "normal" color.

@set DestPath=T:\Post @set NewFolder=New Folder {date|dd'-'MMM'-'yy} Copy CREATEFOLDER="{$DestPath}\{$NewFolder}" FORCE WHENEXISTS=rename Properties FILE "{$DestPath}\*" SETCOLOR=!reset Properties FILE "{$DestPath}\{$NewFolder}" SETCOLOR="red"

Ken, thanks a lot, this one works perfectly now. Interesting part with the "-3" thing, looks like a trick. Also good to know is the color reset command.

Whoops, I meant to edit that out. (I'm editing it out of my code in the post above.) I only changed that so I could create a different folder, (I needed more folders in my test folder).

Oh, just saw it, after tested adding files. Anyway, it works perfectly. :sunglasses: