ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snack Guidelines

Looks like I still dont have a final solution for a custom directory list :(

(1/2) > >>

questorfla:
dir /s /on /b /a:d > list.txt

This one is close, about as close as I have come.
the output though is "too complete" as I only need one line for each folder or better stated
I need one line showing the first occurrence of the file index.php, then skipping to the next subdirectory and listing the same thing there.

I convert these to web-links by reversing the "\" to "/" and replacing the c:\"path"\subdirectory\index.php with "http://www."/subdirectory/index.php in notepad.

I had tried a program someone suggested here and thought it was working but it turned out not to be quite what I needed.
The "dir" command with the listed switches almost did it, but it lists every subdirectory under the main one.

It would almost be easiest to just list all directories and going just 1 level deep.  Example Order: A, Aa, Ac, Ad, Ae,   B, Ba, Bb, Bc, Bd  D, Da,Db,Dc  etc.  Some may have  10 projects, some only 1. 
If I copuld even get this list I could still replace the front end of each and even add the necessary text "index.php" to the end.

This  is to create a clickable list of links that open webpages created by different people all stored on one main website.  Only the site owner can enter at the top level.  The others each have their own named folder containing all their projects.  Each project can be entered directly via the  "www.path/index.php". 

Several program I tried did TOO much, some not enough or had no easy way to save output as a text or preferably Word file (so the links would already be active)

Nothing fancy, just a quick list of clickable links and it seems I should be able to do it with the dir > command if I could just get the switches in the right order.  It is important that it not continue to list ALL the index.php files in each site as there are more than one.  The First one is the entry point.
the rest, I end up having to delete until it reaches the next subdirectory/first index.php file.  Etc.

Thanks for anyone knowing where to add the text to show only the first occurrence of that file.
OR  listing all the namedirs/subdirs but no further. 

TaoPhoenix:
Questorfla, since you didn't say which program you tried, did you try "Karen's Directory Printer" yet? It lets you turn off all info you don't need, saves the output pretty easily to text, and can work on either files with their path or folders.

http://www.karenware.com/powertools/ptdirprn.asp

I've used it for years and I have created "directory to web" projects myself too. (I like to do the shuffle in Excel with a template to add those extra characters etc.)

skwire:
It's still rather unclear exactly what you want in the end.  For requests such as these, it's imperative that you:

1) Provide a sample file structure.
2) Provide a sample of what you expect the output to look like given #1.

questorfla:
Sorry:  I tried to explain it as best I could.  I feel like the three blind men trying to describe an elephant with each touching a different part.
I really don't know any better way than what I have said.  And I have gotten a lot of help here.  The answer will undoubtedly be some kind of selectable directory listing program.  One of the ones I was given as one of the first replies does work after a fashion, I have to edit the output manually but  it does work.

Thanks to everyone for their input.  I may try the Karen's Directory List next.  It looks promising.  All the things I learn just from trying make the search well worth the effort.

4wd:
dir /s /on /b /a:d > list.txt

This one is close, about as close as I have come.
the output though is "too complete" as I only need one line for each folder or better stated
I need one line showing the first occurrence of the file index.php, then skipping to the next subdirectory and listing the same thing there.
-questorfla (April 30, 2013, 12:24 PM)
--- End quote ---

It'll list every occurrence of index.php but maybe:

dir /s /on /b /a:-d index.php > list.txt

Otherwise, as skwire has said, we need an example input and example output to be able to get the right idea.

Navigation

[0] Message Index

[#] Next page

Go to full version