Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


sxz



591 posts

Ultimate Geek
+1 received by user: 120


Topic # 101802 9-May-2012 09:38
Send private message

I have made a list of the contents of a folder using the DOS commands.  I have 600 odd files in 300 odd sub directories.

I need to make a good looking table of contents, i.e. the style I would have in Microsoft Word using the Heading 1, Heading 2, Heading 3 options.

My problem is that the list that DOS spit out is 40 pages long, and will require me going through line by line and deleting the date, time and file size of each document, then organising into a proper list that can give me the table of contents.

My question is - is there a program / better way of doing this or do I need to put in the grunt work?  It seems very repetitive, and it seem like it would be simple to make software to do it (if I could actually make software to do it).  Could be a good way to make $ for someone?

Create new topic
Amanzi
811 posts

Ultimate Geek
+1 received by user: 50

Trusted
Subscriber

  Reply # 622095 9-May-2012 10:00
Send private message

If you're doing it from a command prompt, something like this might help:
dir /s /b c:\Temp >results.txt
That should give you a clean list of file names & paths for the C:\Temp directory and all subdirectories

A better way would be to create a VBA script to list the contents of a directory.

Here's a VBscript that does the job, shouldn't be too difficult to convert it to a VBA: http://blogs.technet.com/b/heyscriptingguy/archive/2004/10/20/how-can-i-get-a-list-of-all-the-files-in-a-folder-and-its-subfolders.aspx

2676 posts

Uber Geek
+1 received by user: 526


  Reply # 622127 9-May-2012 11:29
Send private message

Use the Tree command and pipe it to a text file

Tree > tree.txt



 
 
 
 


sxz



591 posts

Ultimate Geek
+1 received by user: 120


  Reply # 622132 9-May-2012 11:39
Send private message

Thanks for the advice - but I dont really know how to code and do the more complicated stuff like that (I had to read a few articles to remember how to even use the command prompt to print it out).  Are their easier options?

1400 posts

Uber Geek
+1 received by user: 303

Trusted

  Reply # 622138 9-May-2012 11:49
Send private message

Could you first import the list into excel, do the tweaking in there to get rid of the extra info, and then paste it into word?

1400 posts

Uber Geek
+1 received by user: 303

Trusted

  Reply # 622577 9-May-2012 22:12
Send private message

Or you could paste the file paths first into notepad++, which has some powerful find and replace tools that are quite easy to learn

1400 posts

Uber Geek
+1 received by user: 303

Trusted

  Reply # 624899 14-May-2012 14:45
Send private message

Or you could try using Notepad++ , it has powerful find and replace functions for that kind of task.

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Air New Zealand experiments with blockchain technology
Posted 23-Nov-2017 15:39


Symantec selects Amazon Web Services to deliver cloud security
Posted 23-Nov-2017 10:40


New Zealand Ministry of Education chooses Unisys for cloud-based education resourcing management system
Posted 22-Nov-2017 22:00


Business analytics software powers profits for NZ wine producers
Posted 22-Nov-2017 21:52


Pyrios strikes up alliance with Microsoft integrator UC Logiq
Posted 22-Nov-2017 21:51


The New Zealand IT services ecosystem - it's all digital down here
Posted 22-Nov-2017 21:49


Volvo to supply tens of thousands of autonomous drive compatible cars to Uber
Posted 22-Nov-2017 21:46


From small to medium and beyond: Navigating the ERP battlefield
Posted 21-Nov-2017 21:12


Business owners: ERP software selection starts (and finishes) with you
Posted 21-Nov-2017 21:11


Why I'm not an early adopter
Posted 21-Nov-2017 10:39


Netatmo launches smart home products in New Zealand
Posted 20-Nov-2017 20:06


Huawei Mate 10: Punchy, long battery life, artificial intelligence
Posted 20-Nov-2017 16:30


Propel launch Disney Star Wars Laser Battle Drones
Posted 19-Nov-2017 21:26


UFB killer app: Speed
Posted 17-Nov-2017 17:01


The case for RSS — MacSparky
Posted 13-Nov-2017 14:35



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.