Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
(It's **** near impossible to search for this since "%" is ignored in almost all
search engines... )
I'm trying to use the very common "Print directory listing" context menu batch file in
Vista. However, %1 is not returning the directory I am selecting. I tested this by just
trying to echo or cd %1 and I just get blank output - if I put quotes around "%1", I
only get quotes (for echo). %0 still works and shows the batch file name, but no
parameters after that (1,2,3,4...) have any output (just says "echo is on"). Help?
Weird huh?I have already added the shell command key for directories in the registry
(Printdir.bat)Here's the test batch:
echo %1
dir %1 /-p /o:gn >"%temp%\Listing.txt"
start /w notepad "%temp%\Listing.txt"
del "%temp%\Listing.txt"
exitBTW, sfc, AVG, and Mbam didn't find any problems. I'm running Vista Ult.SP1.
edited by moderator: language

What does your HKEY_CLASSES_ROOT\Directory\shell\Print Directory Listing\command\(default) registry entry look like?

Ahah! That didn't quite work... gave me an error about not having
permission to access the specified folder - even on in my own
user directory. But I did find what works..."Printdir.bat" "%1"
Thank you for your time and effort and hopefully this will help
someone else out.

![]() |
insufficient storage on s...
|
Pictures on internet site...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |