?? About Windows File and Folder Names
Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee
-
- *Lifetime Patron*
- Posts: 4284
- Joined: Fri Apr 04, 2003 6:21 pm
- Location: Undisclosed but sober in US
?? About Windows File and Folder Names
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?
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.
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.
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.
-
- *Lifetime Patron*
- Posts: 4284
- Joined: Fri Apr 04, 2003 6:21 pm
- Location: Undisclosed but sober in US
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.
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.
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.
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.
-
- *Lifetime Patron*
- Posts: 4284
- Joined: Fri Apr 04, 2003 6:21 pm
- Location: Undisclosed but sober in US
I'm sure.jhhoffma wrote:... it made for some creative data retention.
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.
Re: ?? About Windows File and Folder Names
So what you want is a spreadsheet containing every filename underneath one folder?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?
If that's it, I could probably easily write something that could output to a delimited text file for you
-
- *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
I used to use VB, they don't care about it where I work now.So what you want is a spreadsheet containing every filename underneath one folder?
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.
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 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.
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