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

WAD VIEW print multiple files - switches fail

Discussion in 'Support' started by CarlM, Jan 26, 2016.

  1. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    Am on TCMD v19 64 bit on Windows 7. My goal is to print all files in a directory with switches. They are .txt files. I have followed the docs, but while the files print, the switches fail.
    In summary, I CANNOT get my /Font and /Header settings to take effect.
    The placement of /P on the line seems to have no effect.
    When I follow the example in the docs: /Font:"Font Name",size eg, /Font:"Courier New",10
    IT DOES NOT WORK -- see below

    What I tried:
    <command line>
    <message>
    <result>

    VIEW *.* /Font:"Calibri",10 /Header:"%e;%f;Page %p" /P /PD
    TCC: (Sys) The system cannot find the file specified.
    "10"
    Print dialog box appears, with default settings, eg: Header is ";;Page"
    All files print, but with default settings, ie not changed by my
    entries for /Font or /Header

    VIEW /Font:"Lucinda Console",10 /Header:"%e;%f;Page %p" /P /PD *.*
    same results as previous

    VIEW *.* /Font:"Lucinda Console",10 /Header:"%e;%f;Page %p" /P
    same results as previous

    VIEW *.* /P /Font:"Lucinda Console",10 /Header:"%e;%f;Page %p"
    same results as previous

    VIEW *.* /P /Font:Lucinda Console,10 /Header:%e;%f;Page %p
    TCC: (Sys) The system cannot find the file specified.
    "Console"
    TCC: (Sys) The system cannot find the file specified.
    "10"
    All files print, but with default settings, ie not changed by my
    entries for /Font or /Header

    VIEW *.* /P /Font:"Lucinda Console,10" /Header:"%e;%f;Page %p"
    <no error messages>
    All files print, but with default settings, ie not changed by my
    entries for /Font or /Header

    VIEW *.* /P /Profile:Ask
    This does work!!
    But I'd like the switches to work!! !! !!
    Have to first set up (once only needed) the profile Ask, with Font & Header, by doing VIEW *.* /P /PD
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    The TCC parser is trying to expand the variables (%e, %f, %p) before passing the command line to VIEW, so what VIEW is seeing with your command line is "*.* /Font:\"Calibri\",10 /Header:\";;Page \" /P /PD". What you need to do is either double up the %'s, i.e.:

    VIEW *.* /Font:"Calibri",10 /Header:"%%e;%%f;Page %%p" /P /PD

    or use back quoting:

    VIEW *.* `/Font:"Calibri",10 /Header:"%e;%f;Page %p" /P /PD`
     
  3. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    Thanks for your reply. They are very helpful, but do not entirely solve the problem:

    I ran these tests:
    VIEW *.* /P `/Font:"Calibri",10 /Header:"%e;%f;Page %p"`
    VIEW *.* /P /Font:"Courier New",10 /Header:"%%e;%%f;Page %%p"
    VIEW *.* /P ``/Font:"Calibri",16` /Header:"%e;%f;Page %p"`

    All the tests printed all files. With the font specified in the command. Headers were correct.
    But the font size was not passed to VIEW. The font sized used was the last successful one -- 10.
    Every test resulted in the error message:
    TCC: (Sys) The system cannot find the file specified.
    "10" [or "16"]
     
  4. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    I'm not quite sure yet that it is WAD (Working As Designed). But I hope it is....
     
  5. Alpengreis

    Joined:
    Jan 12, 2014
    Messages:
    242
    Likes Received:
    6
    Similar problem here: I can set (for ex.) /AM:0.8 ... I can't set the font and/or font size ... (no error msg) ...

    EDIT: The print itself is OKAY, HERE it's a "problem" in Print Dialog only (with param /PD). It shows always (the predefined) "Courier New 10".

    PS: @CarlM the Name is Lucida NOT Lucinda - at least I don't know about a font Lucinda (not related to your problem probably, nevertheless ...)
     
    #5 Alpengreis, Feb 2, 2016
    Last edited: Feb 2, 2016
  6. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    I've been doing my tests with Calibri, so that rules out failure bc of illegal font name.
     
  7. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    Alpengreis -- do you get the error message I get - can't find file "10"?
     
  8. Alpengreis

    Joined:
    Jan 12, 2014
    Messages:
    242
    Likes Received:
    6
    @CarlM

    Hello Carl

    No, I get no message.

    I will try few things yet. MAYBE I can tell then something about it ...

    EDIT: "Unfortunately" I can't tell something, except I was successful with all these variants below ...

    /Font:"Calibri",30 /Header:"%%e;%%f;Page %%p" /P
    `/Font:"Calibri",30 /Header:"%e;%f;Page %p" /P`
    /P `/Font:"Calibri",30 /Header:"%e;%f;Page %p"`
    /P /Font:"Calibri",30 /Header:"%%e;%%f;Page %%p"
    /P ``/Font:"Calibri",30` /Header:"%e;%f;Page %p"`

    All printed correctly without any (error) message.

    PS: OS Win 10 (Pro) x64; TC 19.0.38

    PPS: I have also the FULL version of V installed. Well, for the tests I had used explicit the v.exe of TC. I assume this is anyway not interesting for this case. So, it's just for info.
     
    #8 Alpengreis, Feb 2, 2016
    Last edited: Feb 2, 2016
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    Your comma is an argument separator. You need to either escape it or back quote it. The easiest syntax would be escaping it; i.e.:

    VIEW *.* /P /Font:"Calibri"^^,10 /Header:"%%e;%%f;Page %%p"
     
  10. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    Rex, thank you for your help. Escaping the comma works, so now I have a command that fully works!
    (By the way, I have been unable to get it to work with a back quote, but no need to bother testing and replying to me about how to do that.)

    If I could, I would change the WAD initial description for this thread to DNI (Documentation Needs Improvement). I found only one instance of "^^" in the pdf documentation, and none online. The one discussion of ^^ is in 4.5.22-7 Command Parsing, and it is misleading and incomplete. OTOH, there is a lot of documentation for "%%". It is also very interesting that putting the command tail in back quotes does not stop some parser somewhere from seeing "," as an argument separator. Documentation on that would also be helpful.

    Again, thanks for your help!
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    In order to keep the TCMD documentation within bounds (it's already > 1400 pages), we don't generally devote much space to documenting Windows or CMD behavior. The comma being treated as a command separator is CMD behavior, as is the escaping required. (CMD doesn't support the back quotes, so we do document that).
     

Share This Page