Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Print Directory (XP SP1)

    I use the following batch file and set up my folder options to print a directory listing. How can I change the file to leave the directory list up in notepad instead of sending it to the printer?

    @echo off
    dir %1 /-p /o:gn > "%temp%Listing"
    start /w notepad /p "%temp%Listing"
    del "%temp%Listing" exit

    Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Print Directory (XP SP1)

    Remove the /p from the line that reads
    start /w notepad /p "%temp%Listing"

    You may also want to remove the next line if you don't want the file deleted when you exit notepad.

    StuartR

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Print Directory (XP SP1)

    The minimalist form is probably:

    dir %1 /-p /o:gn > %temp%listing
    notepad %temp%listing

    because unfortunately it doesn't seem to be possible to pipe data into NOTEPAD with
    dir %1 /-p /o:gn | notepad
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Print Directory (XP SP1)

    Thanks, Stuart, that worked. I thought about trying that, guess I just wan't feeling adventurous yesterday!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •