- May
- 3,515
- 5
I wanted to use PDIR to create a batch file to rebuild the junctions on my
volume. A command like this would do the job if I could force quotation
marks surrounding @junction[*] into the output:
pdir/a:j/s/nj/("mklnk" "@junction[*]" fpnq) c:\ > rebuild.btm
The fpnq field creates the proper quoting; quoting directory names which do
not need to be quoted is harmless. However, I could not find any syntax that
would generate "@junction[*]", i.e., report the source directory name
enclosed in quotation marks. I tried \=, %=q, "", """, `"`, etc., but all I
could get into the output is either unquoted names, or the literal string
"@junction[*]". Some forms resulted in empty output, some in error messages
(unclosed quote). Nothing did the trick. I know I can postprocess the file,
possibly using the new binary mode, but I don't see a reason why I cannot
get quotation marks into the report line.
The command below behaves the strangest way:
*pdir/s/nj/a:j/("mklink /j" fpnq "%=q"""@junction[*]") %jps
The first junction is reported correctly, with the source directory name
quoted, but subsequent lines revert to @junction[*] instead.
--
Steve
volume. A command like this would do the job if I could force quotation
marks surrounding @junction[*] into the output:
pdir/a:j/s/nj/("mklnk" "@junction[*]" fpnq) c:\ > rebuild.btm
The fpnq field creates the proper quoting; quoting directory names which do
not need to be quoted is harmless. However, I could not find any syntax that
would generate "@junction[*]", i.e., report the source directory name
enclosed in quotation marks. I tried \=, %=q, "", """, `"`, etc., but all I
could get into the output is either unquoted names, or the literal string
"@junction[*]". Some forms resulted in empty output, some in error messages
(unclosed quote). Nothing did the trick. I know I can postprocess the file,
possibly using the new binary mode, but I don't see a reason why I cannot
get quotation marks into the report line.
The command below behaves the strangest way:
*pdir/s/nj/a:j/("mklink /j" fpnq "%=q"""@junction[*]") %jps
The first junction is reported correctly, with the source directory name
quoted, but subsequent lines revert to @junction[*] instead.
--
Steve