printdir to desktop

G

gil

Is there a way to obtain a directory listing of selected folder(s) which
would appear as a .txt file on the DESKTOP

I had a simple .BAT file which worked in Win ME (but NOT in XP), and
allowed me to right-click any folder and "Send To... DirPrint (on the
Desktop)".

The printdir.bat file was simply

dir "%1" /A /O /S >C:\windows\desktop\Directory.txt
exit

with a shortcut to printdir.bat in the Send To folder.

I am aware of article Q321379 which only outputs a listing to the printer.

How can I change either method into a method which will work on XP, and
will allow output to the desktop only.

--
Gil.

If you get the facts first,
You may not need to reconstruct your hard drive later!

Please reply to the group.

-----
 
T

Torgeir Bakken \(MVP\)

gil said:
Is there a way to obtain a directory listing of selected folder(s) which
would appear as a .txt file on the DESKTOP

I had a simple .BAT file which worked in Win ME (but NOT in XP), and
allowed me to right-click any folder and "Send To... DirPrint (on the
Desktop)".

The printdir.bat file was simply

dir "%1" /A /O /S >C:\windows\desktop\Directory.txt
exit

with a shortcut to printdir.bat in the Send To folder.

I am aware of article Q321379 which only outputs a listing to the printer.

How can I change either method into a method which will work on XP, and
will allow output to the desktop only.
Hi

Try this line instead:

dir "%1" /A /O /S >%USERPROFILE%\desktop\Directory.txt
 
G

gil

Tried your change. No joy.
I get a brief flash of a DOS window, but no file is created on the
desktop. Neither does a search find the file 'Directory.txt' anywhere,
even in hidden and system folders.

Gil.
--

If you get the facts first,
You may not need to reconstruct your hard drive later!

Please reply to the group.
 
T

Torgeir Bakken \(MVP\)

gil said:
Tried your change. No joy.
I get a brief flash of a DOS window, but no file is created on the
desktop. Neither does a search find the file 'Directory.txt' anywhere,
even in hidden and system folders.
Hi

Remove the "'s from %1, and add "'s around
%USERPROFILE%\desktop\Directory.txt and it should start to work:

dir %1 /A /O /S >"%USERPROFILE%\desktop\Directory.txt"
 
G

gil

Thank you, Torgeir, for your help with this feature. The .bat file now
works properly.


Gil.
--

If you get the facts first,
You may not need to reconstruct your hard drive later!

Please reply to the group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top