Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Copying descriptions

Oct
73
1
I often copy file descriptions from one file to another. I wrote a REXX script for that purpose several years ago. I'd like to replace the Rexx script with a BTM, but I'm having a problem.

My initial attempt:

describe target_file /D"%@descript[source_file]"​
It works with an unacceptable limitation. It will not copy descriptions that contain double quotes, such as: Dave Brubeck "Blue Rondo a la Turk"

It strips the quotes. An alternative version copies the quotes using piping:

echo %@descript["source_file"] | describe "target_file"​

By using SETDOS /C~ I was even able to copy descriptions containing ampersands.

THE PROBLEM -- I'm unable to copy a description to several files. For example,

echo %@descript["source_file"] | describe "ambiguous_target_file*"​

only adds the description to a single file (apparently the first match found).

I'm not sure why this doesn't work. Does anyone have any suggestions?
 
THE PROBLEM -- I'm unable to copy a description to several files. For example,

echo %@descript["source_file"] | describe "ambiguous_target_file*"​

only adds the description to a single file (apparently the first match found).

I'm not sure why this doesn't work. Does anyone have any suggestions?

DESCRIBE does not support redirected input for the filenames, only for the descriptions.
 
DESCRIBE does not support redirected input for the filenames, only for the descriptions.

I understand that. I was only piping a description and explicitly giving describe an ambiguous filename.

If I use the command:
describe myfile* /d:"new description"​
all files matching myfile* will get the description "new description"

Apparently describe no longer handles ambiguous filenames properly if the description is received by redirection. If that's the way it's supposed to work, that's okay, but it's a little confusing to my pea brain. :)
 
pizzaman, try this while having Charles Dye's SafeChars plugin installed.
Code:
describe destinationfile /D"%@uquotes[%@descript[sourcefile]]"

Thanks for your suggestion. It does work.

I'm reluctant to depend on a plugin because I like my scripts to run under a standard TCC installation. I'll to continue looking for another solution, but I'll be using the plugin meantime.

My greatest disappointment after I upgraded to Windows 7 was the performance of the Rexx interpreter. Under XP Rexx programs ran at least as fast as btms. I don't know whether the problem lies with Windows 7 or the 64-bit Rexx interpreter, but I strongly suspect it's the latter.
 

Similar threads

Back
Top