Copying descriptions

Oct 24, 2011
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?
 

rconn

Administrator
Staff member
May 14, 2008
12,404
152
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.
 
Oct 24, 2011
73
1
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. :)
 
Oct 24, 2011
73
1
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
Thread starter Title Forum Replies Date
S Copying descriptions in DESCRIPT.ION Support 3
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
D When copying/moving, appending " (2)" to filename when the target file already exist. Support 7
redwdc Copying files with spaces, commas, etc. Support 5
P Copying files in subdirectories Support 9
S iftp copying pgp files from ftp is not working Support 11
P Copying descript.ion file fails Support 8
JohnQSmith Fixed Copying with regex (several issues) Support 7
rps Documentation Help file revision - Copying hidden DESCRIPT.ION files Support 19
Joe Caverly Copying text of MSGBOX Support 0
M Copying files (NOT file contents) to clipboard from TCC Support 17
samintz How to? exclude a subdirectory when copying Support 2
S COPYing attributes Support 3
Charles Dye Difficulty copying DESCRIPT.ION files Support 1
Roedy copying files to DVD or CD Support 3
K Copying and mouse Support 0
CWBillow Windows 7 copying and Take Command Support 5
A GPF when copying large amount of data on busy USB Drive Support 3
p.f.moore Copying Take Command installed folder Support 19
Tim Rowe NTFS Descriptions not working Support 13
Tim Rowe Can't get descriptions to work Support 10
E Fixed Bug with DIR /Z displaying descriptions Support 8
vefatica NTFS descriptions? Support 7
epement File managers that support file descriptions Support 7
JohnQSmith PDIR and descriptions Support 21
JohnQSmith How to? Delete descriptions Support 2
P Fixed TCC descriptions scrambled Support 10
C Directory listing that shows NTFS file descriptions? Support 3
C NTFS Descriptions don't work? Support 3

Similar threads