1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Copying descriptions

Discussion in 'Support' started by pizzaman, Oct 28, 2012.

  1. pizzaman

    Joined:
    Oct 24, 2011
    Messages:
    53
    Likes Received:
    0
    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?
     
  2. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    564
    Likes Received:
    8
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,809
    Likes Received:
    82
    DESCRIBE does not support redirected input for the filenames, only for the descriptions.
     
  4. pizzaman

    Joined:
    Oct 24, 2011
    Messages:
    53
    Likes Received:
    0
    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. :)
     
  5. pizzaman

    Joined:
    Oct 24, 2011
    Messages:
    53
    Likes Received:
    0
    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.
     

Share This Page