WAD VIEW print multiple files - switches fail

Jan 16, 2009
45
0
#1
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
 

rconn

Administrator
Staff member
May 14, 2008
10,533
94
#2
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`
 
Jan 16, 2009
45
0
#3
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"]
 
#5
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 ...)
 
Last edited:
Jan 16, 2009
45
0
#7
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 ...)
Alpengreis -- do you get the error message I get - can't find file "10"?
 
#8
@CarlM

Hello Carl

Alpengreis -- do you get the error message I get - can't find file "10"?
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.
 
Last edited:

rconn

Administrator
Staff member
May 14, 2008
10,533
94
#9
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"]
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"
 
Jan 16, 2009
45
0
#10
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!
 

rconn

Administrator
Staff member
May 14, 2008
10,533
94
#11
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).