there isn't anyway is there..?
this is a no
@set dec = "What"
@set far = "Gives"
SetAttr DESCRIPTION = {$dec} {$far}
this either
@set dec = "What"
@set far = "Gives"
@set here= {$dec} {$far}
SetAttr DESCRIPTION = {$here}
heres the why
@nofilenamequoting
@set dec = {Rs|what descrip}
grep -n "{file}" "{sourcepath}\descript.ion" | sed "s/.{file} //;s/. "{file}" //" | sfk toclip
@set final={$dec} {clip}
SetAttr DESCRIPTION = {$final}
Steve
November 29, 2008, 5:34am
2
Quote man, quotes!
Try this:
@set dec = What
@set far = Gives
SetAttr DESCRIPTION = "{$dec} {$far}"
Here's the handy button..
[code]@nofilenamequoting
Setclip -e
@set dec = {Rs|Add what to description?}
grep -n "{file}" "{sourcepath}\descript.ion" | sed "s/.{file} //;s/. "{file}" //" | sfk toclip
@set final="{$dec} {clip}"
SetAttr DESCRIPTION = {$final}
[/code]
Leo
November 29, 2008, 9:09am
5
You've not told us what it does or where to get the tools it uses (sfk, in particular).
Apologies and heavens you are right. I had some trouble with setclip and opted to use Swiss File Knife...a command line file utility that is worth a look and could be used without the Win32 compiled linux SED and Grep, but do what time permits ehh?
The following are GNU and free for non commercial use:
Swiss File knife here: http://stahlforce.com/dev/index.php?tool=sfk
Sed - a command line text editor with regular expressions here: http://sed.sourceforge.net/
and GREP a command line search utility:http://gnuwin32.sourceforge.net/packages/grep.htm
Essentially, the button greps descript.ion file for the file selected in the lister and sed returns existing desc for the file to the clipboard. and APPENDS it with SetAttr DESCRIPTION = {$final}. DO likes to edit the file itself rather than doing it with sed directly. Inserting with Sed alone required a go refresh after every sed change of the file
Dare I say 'TAGS' in the description column? I have buttons that append tags to my files now. I hope that others might find this useful to. Surely there is a more eloquent solution, however this wildcat button rocks...
beware that the sfk, grep and sed need to be in the path.
tags tags tags ....
Leo
December 1, 2008, 2:16am
7
Makes sense. Thanks for the info!
Here is the latest form of a three button group to operate on the description:
Add to description - get description to clipboard and clear the descrition for the file.
Cheers!
<?xml version="1.0"?>
<button backcol="none" display="both" textcol="none" type="three_button">
<label>Add description</label>
<icon1>#addtocollection_2</icon1>
<button backcol="none" display="both" separate="yes" textcol="none">
<label>Add description</label>
<tip>Add description</tip>
<icon1>#addtocollection_2</icon1>
<function type="batch">
<instruction>@nodeselect </instruction>
<instruction />
<instruction>@nofilenamequoting </instruction>
<instruction />
<instruction>Go REFRESH </instruction>
<instruction />
<instruction>Setclip -e</instruction>
<instruction />
<instruction>@set dec = {Rs|Add what to description?}</instruction>
<instruction />
<instruction>grep -n "{filepath}" "{sourcepath}\descript.ion" | sed "s/.*{filepath} //;s/.*\"{filepath}\" //" | sfk toclip</instruction>
<instruction />
<instruction>SetAttr DESCRIPTION = "{$dec} {clip}"</instruction>
</function>
</button>
<button backcol="none" display="both" textcol="none">
<label>Get Descr to clip</label>
<tip>Get Descr to clip</tip>
<icon1>#moveas</icon1>
<function type="batch">
<instruction>@nofilenamequoting </instruction>
<instruction> grep -n "{file}" "{sourcepath}\descript.ion" | sed "s/.*{file} //;s/.*\"{file}\" //" | sfk toclip</instruction>
</function>
</button>
<button backcol="none" display="both" textcol="none">
<label>Clear description</label>
<tip>Clear description</tip>
<icon1>#addtocollection_2</icon1>
<function type="batch">
<instruction>SetAttr DESCRIPTION = ""</instruction>
</function>
</button>
</button>