?? About Windows File and Folder Names

Our "pub" where you can post about things completely Off Topic or about non-silent PC issues.

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

?? About Windows File and Folder Names

Post by aristide1 » Wed Mar 05, 2008 5:45 pm

At work have tons of servers. One is for documents. There is a folder for each acronym, with many sub folders and files at many different levels below it. One massive hierarchy.

My question is - I would like to put all the file and folder names into an Excel spreadsheet. What would really be great is if hyperlinks also got inserted, but I'm not expecting miracles. Is there any software that will help me accomplish this?
Last edited by aristide1 on Fri Mar 07, 2008 5:18 am, edited 1 time in total.

teejay
Patron of SPCR
Posts: 749
Joined: Mon Aug 02, 2004 2:23 am
Location: The Netherlands

Post by teejay » Wed Mar 05, 2008 10:17 pm

Disclaimer: probably too simplistic for your needs.

Open a command window, enter "dir /b /s > output.txt", wait until it finishes and import the resulting output.txt file in Excel. You might run into the max. number of rows that Excel can display, though.

As an alternative, you could write (or look for) a small piece of VBA code in Excel to accomplish the same.

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Post by aristide1 » Thu Mar 06, 2008 6:03 am

From what I've seen of the dir output I would still have a editing to do. And the hyperlink addition is what's really time consuming.

Thanks

Matija
Posts: 780
Joined: Sat Mar 17, 2007 3:17 am
Location: Croatia

Post by Matija » Thu Mar 06, 2008 7:37 am

"tree /f" should help you with the hierarchy, but yes, you are going to need something to do the hyperlinks.

jhhoffma
Posts: 2131
Joined: Mon Apr 25, 2005 10:00 am
Location: Grand Rapids, MI

Post by jhhoffma » Thu Mar 06, 2008 11:18 am

I think this is another reason M$ was looking to implement WinFS (object-based file structure) for easier navigation.

However, if your hierarchy is too deep for easy navigation, maybe a more efficient remapping of the files and folders would be a better path?

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Post by aristide1 » Thu Mar 06, 2008 5:42 pm

jhhoffma, oh you made me laugh.

Restructuring is not just something I can just get up and do. And to tell the higher ups would mean it must be said without implying "what's been done here and you lived with it, is really stupid". That's not easy. It's way too late to view it logically, though I do hope they delete dozens of empty folders. I consider myself lucky I can rename folders so words are all capitalized appropriately.

I have even put hyperlinks on folders themselves and it works. Windows Explorer opens up and goes straight there. It's always impressive to see Windows do something right.

Some people have linked documents, so stuff is not going anywhere very easily or safely. When all this started if someone said we need a plan here it would have been better, but I suspect nobody recognized the need in the beginning, and hence, it's all a bunch of tack ons.
Last edited by aristide1 on Thu Mar 06, 2008 7:06 pm, edited 1 time in total.

jhhoffma
Posts: 2131
Joined: Mon Apr 25, 2005 10:00 am
Location: Grand Rapids, MI

Post by jhhoffma » Thu Mar 06, 2008 6:41 pm

Understood, I wasn't clear that you were not the guy in charge.

I worked for a Fortune 500 company at the infancy of my PC experience and even then I knew enough to know that my friends in IT had no clue how to organize a public share. Top that off with a 50MB limit on private shares and the promise that they wiped everything that wasn't "approved" over the weekend, it made for some creative data retention.

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Post by aristide1 » Thu Mar 06, 2008 7:04 pm

jhhoffma wrote:... it made for some creative data retention.
I'm sure. :lol:

I'm building this massive index spreadsheet over the last week. I told him somebody would need to keep it current (another dumb ass reminder). I added a date column when I entered that row, so that can look at the file attributes and figure out what needs to be done.

I have $20 that says it will get used for about a month and then that's it. I'll still create it, no matter how long it takes, because the boss thinks I'm being smarter than when I'm doing a Soduko puzzle, but what does he know? I'm going to try the Mensa Brown Belt Soduko book. 8)

Conroy
Posts: 127
Joined: Sun Aug 11, 2002 3:26 pm
Location: NY

Re: ?? About Windows File and Folder Names

Post by Conroy » Thu Mar 06, 2008 9:20 pm

aristide1 wrote:At we have tons of servers. One is for documents. There is a folder for each acronym, with many sub folders and files at many different levels below it. One massive hierarchy.

My question is - I would like to put all the file and folder names into an Excel spreadsheet. What would really be great is if hyperlinks also got inserted, but I'm not expecting miracles. Is there any software that will help me accomplish this?
So what you want is a spreadsheet containing every filename underneath one folder?

If that's it, I could probably easily write something that could output to a delimited text file for you

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Re: ?? About Windows File and Folder Names

Post by aristide1 » Fri Mar 07, 2008 5:16 am

So what you want is a spreadsheet containing every filename underneath one folder?
I used to use VB, they don't care about it where I work now.

Man, I look at my text and I'm amazed at how many times my brain thinks of one word and my fingers type another. Duh.

floffe
Posts: 497
Joined: Mon May 08, 2006 4:36 am
Location: Linköping, Sweden

Post by floffe » Fri Mar 07, 2008 8:12 am

Cygwin with bash and awk/sed should be able to help you get a bit on the way (find each dir and sub-dir, list contents in each of them with, write this to a text file with appropriate indentation, move on to next dir, and then after all dirs are done . Of course, there's always the issue of whether it's more work to make a working script compared to doing it by hand...

A simple (untested, might not work the first time it's run) bash script would be

Code: Select all

find . | sed -e 's#\.\/##' -e 's#/#;#g' > list.txt
Assuming you are in the root dir of what you want to index, this'll find all subdirs and files, and output them to list.txt separated by semicolon, so the file ./path/to/file.doc will have a line looking like this: "path;to;file.doc", which should be easy enough to import with a correct structure into any spreadsheet app. The sed -e s#foo#bar# replaces foo with bar, the first of them removes the leading ./ (both of those need to be escaped by backslashes), while the second one replaces all slashes with semicolons.

aristide1
*Lifetime Patron*
Posts: 4284
Joined: Fri Apr 04, 2003 6:21 pm
Location: Undisclosed but sober in US

Post by aristide1 » Fri Mar 07, 2008 8:10 pm

Odd thing about the DOS command box in XP and network drives. I can switch to the U: drive successfully and in less than a second it switches back by itself. I can dir the root directory, but it won't let me do it about 5 levels down. :?

Post Reply