Welcome!

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

SignUp Now!

pdir inconsistency

Sep
8
0
One of two of my old script are getting output truncated using TCC 11.00.33 x64. Happening where I'm using '()' brackets in the output. Works ok if I use '{}' brackets instead.

Is this limitation by design?

Here's an example ("ss" is a variable in my original script):

[C:\Users\Public\Music\Sample Music]pdir /(dy-m-d th:m f ("ss"))
2009-07-14 05:32 Kalimba.mp3 (ss
2009-07-14 05:32 Maid with the Flaxen Hair.mp3 (ss
2009-07-14 05:32 Sleep Away.mp3 (ss

[C:\Users\Public\Music\Sample Music]m:\Apps\4NT\4nt.exe /c pdir /(dy-m-d th:m f ("ss"))
2009-07-14 05:32 Kalimba.mp3 (ss)
2009-07-14 05:32 Maid with the Flaxen Hair.mp3 (ss)
2009-07-14 05:32 Sleep Away.mp3 (ss)

[C:\Users\Public\Music\Sample Music]pdir /(dy-m-d th:m f {"ss"})
2009-07-14 05:32 Kalimba.mp3 {ss}
2009-07-14 05:32 Maid with the Flaxen Hair.mp3 {ss}
2009-07-14 05:32 Sleep Away.mp3 {ss}
 
djgibson wrote:
| One of two of my old script are getting output truncated using TCC
| 11.00.33 x64. Happening where I'm using '()' brackets in the output.
| Works ok if I use '{}' brackets instead.
|
| Is this limitation by design?
|
| Here's an example ("ss" is a variable in my original script):
|
| [C:\Users\Public\Music\Sample Music]pdir /(dy-m-d th:m f ("ss"))
| 2009-07-14 05:32 Kalimba.mp3 (ss
| 2009-07-14 05:32 Maid with the Flaxen Hair.mp3 (ss
| 2009-07-14 05:32 Sleep Away.mp3 (ss
...

Confirmed in 32-b build (TCC 11.00.33 Windows XP [Version 5.1.2600]).
Even with the corrected syntax

pdir /a: /(dy-m-d th:m f "(ss)")

the right parenthesis of the quoted string disappears.
--
Steve
 
djgibson wrote:
| One of two of my old script are getting output truncated using TCC
| 11.00.33 x64. Happening where I'm using '()' brackets in the output.
| Works ok if I use '{}' brackets instead.

The problem is the same in 10.0.76 - the trailing right parenthesis is
dropped. The same syntax works as expected in 4nt 8.02.106 and tcc 9.02.156.
--
Steve
 
> One of two of my old script are getting output truncated using TCC
> 11.00.33 x64. Happening where I'm using '()' brackets in the output.
> Works ok if I use '{}' brackets instead.
>
> Is this limitation by design?

Yes. (Also your syntax is wrong; you cannot use either ( or ) outside of a
quoted string unless you want them processed as delimiters.)

Because I couldn't think of any good reason to use () *inside* a quoted
string in PDIR (and to simplify parsing several other new features), PDIR is
going to truncate the argument at the first ), regardless of whether it's
inside a string.

Rex Conn
JP Software
 
rconn wrote:
| Because I couldn't think of any good reason to use () *inside* a
| quoted string in PDIR (and to simplify parsing several other new
| features), PDIR is going to truncate the argument at the first ),
| regardless of whether it's inside a string.

Not asking for a code change, though a documentation change would avoid
future questions. However, I can suggest at least one reason to use
parentheses inside a quoted string in PDIR's output: to create a batch file
which executes a command group. If I understood the OP correctly, in the
original form (not the one reduced for the purpose of discrepancy reporting)
the quoted string in parentheses contained at least one variable or variable
function, thus being a dynamic field in the report.
--
Steve
 

Similar threads

Back
Top