• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hyperlinking multiple folders

shayneedshelp

New Member
I need help !!!!
I don't usually use excel
I have a project that requires me to hyperlink every folder and there are 455 folders. My fingers hurt past 12 folders. Is there a quick way to hyperlink these folders?
We live in 2018, space x just launched a rocket to space, we can unlock phones with our faces, so I think there might be a solution out there that can help me.
CAN ANYONE HELP ME !!!!! PLEASEEEEEEEEE
 
Hey Alan
Thank you so much, that link helps with a listing files
I need help listing folders and sub folders and not the the file items
 
If you don't usually use Excel.

Why not use a tool that exports directory structure to Excel, HTML or some other format?

There are plenty of tools out there.
https://www.raymond.cc/blog/print-all-file-and-folder-contents-to-text-or-printer/

Alternately, you can use command line tool (cmd.exe) to export out directory structure using few commands.

First, find command line tool by going to Windows Start menu and typing "cmd" and launch.

Then navigate to root directory where you need to list folders. You can use below command.
Code:
cd\folderpath

Then once you are at the folder in cmd tool, type following command.
Code:
dir /s /b /o:n /a:d >myfolders.txt

This will out put folder list as text file at current directory.

Now open Excel and import the text file as normal.

Once text is imported, run following code to convert folder list into hyperlinks.
Note: Run the code while you have the sheet active. Code should be pasted into standard module (ex. module1).
upload_2018-2-20_9-14-16.png

Code:
Sub Demo()
Dim cel As Range
For Each cel In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
    cel.Hyperlinks.Add cel, cel.Value
Next
End Sub
 
Back
Top