i need a program that will look in a folder and transfer the name of very file in that folder, to a text file
CAN ANYONE HELP?
Printable View
i need a program that will look in a folder and transfer the name of very file in that folder, to a text file
CAN ANYONE HELP?
Open notepad and typeand then save as your choice of name.batCode:dir c:\windows /b > c:\result.txt
So it is a batch file that in this case will list the files that are located in C:\Windows into a text file called result.txt and save it in C:\
One of the DOS Gurus on this board will probably tell you how to modify this batch file to accept parameters for the directory name to be searched and the location and name of the result file.
EDIT: Better yet here is what I used to do the below Found it again.
dir /a /-p /o:gen >filelisting.txt in a .bat file and save it in the Windows folder.
Now Open windows explorer, and chose Tools/folder options/File types tab/Folder/advanced/new to open a new Action box.
In the new actionbos, type in the name you want to appear in the context menu.
Browse to the .bat file and select it in box labeled "Application used to perform action". Click ok and when you right click a folder you will see the what ever you names it has benn added as one of the actions in the Edit field.
Now when I use this on a folder, I see a quick flash , then when i open the folder and double click FileListing.txt, it opens and shows me what is in the folder.
For some reason, which I do not know why, sometimes this does not work. Yep had that happen. But the now it does. Found it does not work on networkee drivers either. :(
I have the following .bat file (named "yourname.bat"--of course you can name it what you want) in my Send To folder.
dir %1>C:\windows\desktop\yourname.txt
cls
Now if you right click on a folder, the drop down menu (in Win98 anyway) should offer "Send To>". Put your cursor on that and the Send To drop down menu should offer "yourname.bat" as one of the choices. Click on that and you will have created a file named yourname.txt on the Desktop with the contents of the folder.
Train, that's pretty cool, I've done it in NT (View > Options > File Types) but it flashes a screen and then creates the filelisting.txt but doesn't display it.
Also it seems to create a list of the directory you're in an not the one you're right clicking on.
ie If I'm in C: and right click on C:\WinNT it gives me a list of whats in C: ?
Hmm WelshJim, that seems like a good one too.
It's a bit like the simple thing I do on every machine I work on, create a link to Notepad in the Send To folder so I can just right click on a file and send it to notepad handy for quickly opening a file for viewing it's contents.
Karen's Directory Printer will do what you want as well (freeware):
http://www.karenware.com/powertools/ptdirprn.asp
SuperSparks--No question Karen's Directory Printer is a much more powerful tool. Lots of variety in what will be printed.
Printing with it can be put into Send To as well.
I've been using a great program called RJH Extensions . It will add some very practical items (fully customizeable) to your right click context menu.
Hope this helps.........
I find the filelist.txt in the folder I R-clicked and a flash is all I get too. But as I commented, I have one xp system it does not work with :confused:Quote:
Originally posted by Nix
Train, that's pretty cool, I've done it in NT (View > Options > File Types) but it flashes a screen and then creates the filelisting.txt but doesn't display it.
Also it seems to create a list of the directory you're in an not the one you're right clicking on.
ie If I'm in C: and right click on C:\WinNT it gives me a list of whats in C: ?
I like "Karen's Directory Printer " also, used the heck out of it in 98.
Hmmm I must have done something wrong.Quote:
Originally posted by Train
I find the filelist.txt in the folder I R-clicked and a flash is all I get too.
Ok worked it out.
Firstly the lineshould probably readQuote:
the list will be generated and displayed at the bottom of the open Notepad window as filelisting.txt
as this is what happens when you have the folders and files listed in detail mode.Quote:
the list will be generated and displayed at the bottom of the open Explorer window as filelisting.txt
Secondly I was under the impression that if I was in C:\Windows and right clicked on C:\Windows\System it would list what is in C:\Windows\System. As it was listing what's in C:\Windows I thought I must have made an error. However close inpsection of the screen shot
http://hacks.oreilly.com/images/hack...s/xph_0305.gif
shows that the highlighted folder is called Sample Music, but the list of files shown in
http://hacks.oreilly.com/images/hack...s/xph_0306.gif
is in fact the same as those listed in the first screen shot so it actaully does list the files and folders in the current directory and not the one being right clicked on.