Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Make A Text File List Of Files In A Folder


  • Please log in to reply
24 replies to this topic

#1 hothett

hothett

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 11:00 AM

i am looking to make text documents of all my files i have located on exterenal hard drives. so i can see what i have on the drives without hooking them up.

also when putting data onto DVD's it is nice to be able to quickly make a list.


i am sure there is a fast easy way to do this.
thanks
hothett

BC AdBot (Login to Remove)

 


#2 mvs

mvs

  • Members
  • 55 posts
  • OFFLINE
  •  
  • Local time:06:13 PM

Posted 16 October 2006 - 11:43 AM

^ you are working with windows - right ?
freewares available for the above task .

one such freeware utility is file list
it is a commandline utility . see details
Lets Quote Only the relevant parts of Previous Posts

#3 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 12:09 PM

xp yes. but i cant seem to make FileList work.
dont really understand what i am to do.

#4 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 12:13 PM

there arent any tips of tricks for doing this? only programs?

#5 jchedot

jchedot

  • Members
  • 66 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:43 AM

Posted 16 October 2006 - 01:03 PM

The easiest way I know is from a command prompt (Start, Run, cmd). For example: "dir d:\>c:\directory.txt" (without the quotes) will write all file names on your d drive to a file named directory.txt in the root of your c drive. If you need to include contents of subfolders use the /s switch with the dir command. For more options type "dir /?" (without the quotes) at the command prompt.
I finally got it all together, now if I could just remember where I put it.

#6 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 01:41 PM

The easiest way I know is from a command prompt (Start, Run, cmd). For example: "dir d:\>c:\directory.txt" (without the quotes) will write all file names on your d drive to a file named directory.txt in the root of your c drive. If you need to include contents of subfolders use the /s switch with the dir command. For more options type "dir /?" (without the quotes) at the command prompt.

that is what i am looking for.
is there a way to do just one folder on your HD?
i was sucsessful in making txt of a cd but hoping you can give me one more pointer with this.
i tried replacing "dir d:\>c:\directory.txt" to make it read
"dir C:\Documents and Settings\Dell\My Documents\>c:\directory.txt"

colored part indicates what i changed to what.

hothett

#7 jchedot

jchedot

  • Members
  • 66 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:43 AM

Posted 16 October 2006 - 01:45 PM

That should work, you can either do it by giving the full path of the folder, or by changing to the folder with the CD command.
I finally got it all together, now if I could just remember where I put it.

#8 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 02:34 PM

jchedot,
i am haveng trouble getting the dir to find just one folder. comes back cant find directory.
any ideas what i am doing wrong?

on the upside i can get the command prompt to work for the whole drive. if it comes to it i could just edit my txt file after i geuss, but i really want to understand this. and thanks for your help.

everyones help. this is a good place :thumbsup:

#9 jchedot

jchedot

  • Members
  • 66 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:43 AM

Posted 16 October 2006 - 03:02 PM

Maybe the easiest thing for you to do is navigate to the individual folders..

Try this

CD C:\Documents and Settings\Dell\My Documents
dir>c:\mydocuments.txt

That will Change Directory to your My Documents folder
And then redirect the directory command to a text file in the root of your c: drive
I finally got it all together, now if I could just remember where I put it.

#10 -David-

-David-

  • Members
  • 10,603 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London
  • Local time:01:43 PM

Posted 16 October 2006 - 03:15 PM

You can use batches to carry out this process, it's easier that the command prompt.
You can use relevan switches to specific what you are after.

Open notepad and copy and paste the following text in the quote box into the window:

CD\Documents and Settings\Dell\My Documents
dir > c:\mydocuments.txt
start c:\mydocuments.txt

Save this as fix.bat
Choose to save as all files.
This is how the batch must look afterwards: Posted Image
Doubleclick fix.bat and let the program run.
The list of files/folders in the specified folder will open.

You can replace whatever folder you wish after the "CD" command.
For example if you wanted this: C:\Windows\system32,
Your top line in the batch would be this -- "CD\Windows\system32".

If you want a list of switches let me know and I can copy them out.

#11 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 03:22 PM

jchedot,
i have been playing with it and it looks like it doesnt like the spaces in the input names. it works with c:\driver but not for c:\Documents and Settings.

?

D,
will try this also. ty

Edited by hothett, 16 October 2006 - 03:24 PM.


#12 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,490 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:08:43 AM

Posted 16 October 2006 - 04:06 PM

As described before, but spaces should be included between the switches, and Directory names or filenames shoud be in quotes if they contain spaces in Windows2000. WindowsXP is more forgiving, but not 100% consistent, sometimes you gotta have the quotes, in other places you don't. Example:

dir "C:\Documents and Settings\<username>\My Documents\My Pictures" /s /n >"c:\some dir\some file.txt"
will give you a list of My Pictures main level and /s will give ya subdirectories as well, and all of it will be sorted by filename (/n) or by date (/d) or extension or whatever you choose, within each subdirectory
<username> change that of course

Go into command prompt as described above and just type dir /?
That'll give you complete description of ALL options and switches.

To write to a file just do the redirection >

Edited by tos226, 16 October 2006 - 04:10 PM.


#13 jchedot

jchedot

  • Members
  • 66 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:43 AM

Posted 16 October 2006 - 04:16 PM

Thanks tos -- I forgot about the quotes for file names with spaces
I finally got it all together, now if I could just remember where I put it.

#14 usasma

usasma

    Still visually handicapped, new avatar (a camel) :0)


  • Members
  • 16,690 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:08:43 AM

Posted 16 October 2006 - 06:29 PM

On occasion Windows will revolt over the long filenames (and especially the spaces). To prevent this just use the first 6 characters of the folder name, then the "~" and then a "1" (in some instances it may be a 2, 3, etc). As I recall, spaces can also be annotated as "%20"

For example C:\Documents and Settings\ can also be
C:\Docume~1\
- John
**If you need a more detailed explanation, please ask for it. I have the Knack. **

#15 hothett

hothett
  • Topic Starter

  • Members
  • 77 posts
  • OFFLINE
  •  
  • Local time:07:43 AM

Posted 16 October 2006 - 10:00 PM

looking good. time for bed but will give this all a shot in the AM

thank you all




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users