Again, as using, using a “saved” TCC session transcript:
This what one would expect and is OK, except for the fact that the individual fields are both separated by blanks and contain blanks, so there’s really no reliable way to “parse” the individual fields.
Next try:
This one also works as one would expect and the results are easily “parsable”. However, the output file is far larger than one might like it to be since it contains sometimes rather-long sequences of consecutive blanks. (In the "real world" case, these sequences of blanks could be well over 100 characters long.)
So, next try:
This is not quite what I would expect given that the double quotes are retained the despite the fact that the documentation says “"..." Literal string (in quotes). Characters are displayed as is, except that escape characters are converted”, which I would at least think implied that the double quotes would be “stripped” (after all, who would want to see the double quotes in the output?).
So next try skipping the double quotes:
This is not only not what I want, but where did those "D41D8CD98F00B204E9800998ECF8427E" sequences come from?
So, on the way to what I’m really trying to accomplish:
The double-qoutes again, kind of what you would expect given the previous.
So, attempting to just remove the double quotes:
What you really expect given that the there is nothing to delimit the variable name and the field names; and again, what are those "D41D8CD98F00B204E9800998ECF8427E" sequences?
So, next attempt using the way sequential variables are otherwise “separated” in TCC (with a trailing percent sign, as for cmd.exe, I believe):
Well, that didn’t work either (no particular surprise for now).
So that’s it for now. Is there any way I can “stick” the value of a variable into PDir’s output without the surrounding double quotes?
- Dan
Code:
Mon Feb 27, 2012 3:00:55p
TCC 13.03.46 Windows 7 [Version 6.1.7601]
Copyright 2012 JP Software Inc. All Rights Reserved
Registered to Daniel Mathews
[Z:\]cd PDirTests
[Z:\PDirTests]PDir * /(@Ext[*] fpn zc dy/m/d th:m:s)
txt Z:\PDirTests\A File.txt 0 2012/02/27 14:46:13
txt Z:\PDirTests\A Third File.txt 0 2012/02/27 14:46:31
txt Z:\PDirTests\And A Fifth File.txt 0 2012/02/27 14:47:04
txt Z:\PDirTests\Another File.txt 0 2012/02/27 14:46:19
txt Z:\PDirTests\Still Another File.txt 0 2012/02/27 14:46:41
Next try:
Code:
[Z:\PDirTests]PDir * /(-3.3@Ext[*] -40.40fpn zc dy/m/d th:m:s)
txt Z:\PDirTests\A File.txt 0 2012/02/27 14:46:13
txt Z:\PDirTests\A Third File.txt 0 2012/02/27 14:46:31
txt Z:\PDirTests\And A Fifth File.txt 0 2012/02/27 14:47:04
txt Z:\PDirTests\Another File.txt 0 2012/02/27 14:46:19
txt Z:\PDirTests\Still Another File.txt 0 2012/02/27 14:46:41
So, next try:
Code:
[Z:\PDirTests]PDir * /A-D /(@Ext[*]"*"fpn"*"zc"*dy/m/d"*"th:m:s)
txt"*"fpn"*"zc"*dy/m/d"*"th:m:s
txt"*"fpn"*"zc"*dy/m/d"*"th:m:s
txt"*"fpn"*"zc"*dy/m/d"*"th:m:s
txt"*"fpn"*"zc"*dy/m/d"*"th:m:s
txt"*"fpn"*"zc"*dy/m/d"*"th:m:s
So next try skipping the double quotes:
Code:
[Z:\PDirTests]PDir * /(@Ext[*]*fpn*zc*dy/m/d*th:m:s)
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
So, on the way to what I’m really trying to accomplish:
Code:
[Z:\PDirTests]Set Var=*
[Z:\PDirTests]PDir * /A-D /(@Ext[*]"%Var"fpn"%Var"zc"%Var"dy/m/d"%Var"th:m:s)
txt"*"fpn"*"zc"*"dy/D41D8CD98F00B204E9800998ECF8427E/*14:46:13
txt"*"fpn"*"zc"*"dy/D41D8CD98F00B204E9800998ECF8427E/*14:46:31
txt"*"fpn"*"zc"*"dy/D41D8CD98F00B204E9800998ECF8427E/*14:47:04
txt"*"fpn"*"zc"*"dy/D41D8CD98F00B204E9800998ECF8427E/*14:46:19
txt"*"fpn"*"zc"*"dy/D41D8CD98F00B204E9800998ECF8427E/*14:46:41
So, attempting to just remove the double quotes:
Code:
[Z:\PDirTests]PDir * /A-D /(@Ext[*]%Varfpn%Varzc%Vardy/m/d%Varth:m:s)
txtVarzc/D41D8CD98F00B204E9800998ECF8427E/02:s
txtVarzc/D41D8CD98F00B204E9800998ECF8427E/02:s
txtVarzc/D41D8CD98F00B204E9800998ECF8427E/02:s
txtVarzc/D41D8CD98F00B204E9800998ECF8427E/02:s
txtVarzc/D41D8CD98F00B204E9800998ECF8427E/02:s
So, next attempt using the way sequential variables are otherwise “separated” in TCC (with a trailing percent sign, as for cmd.exe, I believe):
Code:
[Z:\PDirTests]PDir * /A-D /(@Ext[*]%Var%fpn%Var%zc%Var%dy/m/d%Var%th:m:s)
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
txt*fpn*zc*dy/D41D8CD98F00B204E9800998ECF8427E/*th:02:s
So that’s it for now. Is there any way I can “stick” the value of a variable into PDir’s output without the surrounding double quotes?
- Dan