Tips4pc forum
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 07, 2010, 08:11:12 PM

Login with username, password and session length
Search:     Advanced search
Ask a question! REGISTER NOW! 
Make a new post

2984 Posts in 661 Topics by 294 Members
Latest Member: mr_stringz2004
* Home Help Login Register
Tips4pc forum  |  Computer Issues  |  Anything Goes  |  Topic: A batch file to make a directory list for Windows Vista? 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: A batch file to make a directory list for Windows Vista?  (Read 776 times)
Mitz
Administrator
*****
Offline Offline

Posts: 754



WWW
« on: March 31, 2009, 08:02:27 AM »

I have a batch file to make a list in notepad of a directory but it was made for Windows XP.
Now I am trying to remodel it for Windows Vista.

Here is the batch file:
@echo Dumping directory listing to c:\dirListing.txt
@echo        (This may take some time for large directory trees.)
@REM the /A switch lists all hidden and system files as well.
@REM the /S switch lists all subdirectories and their contents.
@dir %1 /A /S > c:\dirListing.txt
@echo Opening c:\dirListing.txt in Notepad (Close notepad to delete file)
@notepad c:\dirListing.txt
@echo Deleting c:\dirListing.txt
@del c:\dirListing.txt
@pause

So what you do is make this batch file and put it in the sendto menu folder. Then you go to the directory you want to list, right click on it and choose send to...then your batch file...and the list appears in notepad.


But of course this does not work for vista...If doubleclick on the batch file it will give me a list of c drive but it will not work when I put it in the send to folder.
Logged

Tips4pc                                                                100Vista                                                     Pc Tips
Everyone can learn something new everyday! Cheesy
Merlin33069
Administrator
*****
Offline Offline

Posts: 216



WWW
« Reply #1 on: March 31, 2009, 08:07:19 AM »

For some strange reason, they took out that functionality...

after a quick look online, it is possible to do with a vbs script

you can make the script and add it to the context menu, then have it run the batch file, running it like dirbatch.bat C:

so that the %1  would be c:

beyond that i have no clue how to do it....
Logged

TimmCo Custom Computers

WWW.TimmCom.com
Merlin33069
Administrator
*****
Offline Offline

Posts: 216



WWW
« Reply #2 on: March 31, 2009, 08:18:23 AM »

I lied

i put this in a batch file, and added it to the send to menu

dir /a /s>lol.txt

and it creates a file called lol.txt and adds the directory listing to it.... the lol.txt is in the same folder as the batch..

ps vista send to menu is at:

(enter this into run)

%APPDATA%\Microsoft\Windows\SendTo
Logged

TimmCo Custom Computers

WWW.TimmCom.com
Mitz
Administrator
*****
Offline Offline

Posts: 754



WWW
« Reply #3 on: March 31, 2009, 08:38:51 AM »

so you took the 1% out ?
Yep it works but this is the funny thing....
If I wanted the dir list for C:\Users\Mitz\Documents\my webs you do not right click on the actual my webs folder because it gives you all of the documnets dir list...You have to enter my webs and right click on a folder there, then it will give you the dir list for my webs?Huh?
Is this happening to you?

Another way to get to the sendto folder in Vista:
Hit the winkey and R to open run.
Type in shell:sendto
Logged

Tips4pc                                                                100Vista                                                     Pc Tips
Everyone can learn something new everyday! Cheesy
Merlin33069
Administrator
*****
Offline Offline

Posts: 216



WWW
« Reply #4 on: March 31, 2009, 08:44:15 AM »

yes, im not sure how to fix it....
Logged

TimmCo Custom Computers

WWW.TimmCom.com
Mitz
Administrator
*****
Offline Offline

Posts: 754



WWW
« Reply #5 on: March 31, 2009, 09:58:08 AM »

Well at least it works anyway...Thanks for that Merlin..
Logged

Tips4pc                                                                100Vista                                                     Pc Tips
Everyone can learn something new everyday! Cheesy
Pages: [1] Go Up Print 
Tips4pc forum  |  Computer Issues  |  Anything Goes  |  Topic: A batch file to make a directory list for Windows Vista? « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!