How do i create i text file of folder contents?

By lowlifelenny
Aug 11, 2002
Topic Status:
Not open for further replies.
  1. I do not know how to do this. Please help. Thanks in advance
  2. Didou

    Didou Bowtie extraordinair! Posts: 5,899

    That's a very clear question. We do not know if you're using Windows, DOS, Unix, Linux, BeOS, etc...

    For Windows, at the console type :

    dir C:\temp > contents.txt

    This will create a file called contents.txt with a listing of files on C:\temp ( for more options, type dir /? ).

    dir C:\temp >> contents.txt

    This is almost the same thing as the first instruction, only difference is that if Contents.txt allready exists, its content won't be overwritten by the new one. The new listinbg will be put at the end of what was allready present in the TXT file.

    For Linux, once again at the console type :

    ls /temp > contents.txt

    This will create a file called contents.txt with a listing of files on /temp ( for more options, type ls --help ).
  3. Phantasm66

    Phantasm66 Newcomer, in training Posts: 6,504

    Well done Didou, that's an excellent answer.
  4. lowlifelenny

    lowlifelenny Newcomer, in training Topic Starter

    Cheers mate. That was a big help. Thanks again
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.