Solved

Coping File names into Excel

Posted on 2011-03-11
4
322 Views
Last Modified: 2012-05-11
Dear All,
Can you help i have a user that wants to copy pdf file names into excel and sort them in order of the file names that way can anyone help on how to do this excel
Many thanks
0
Comment
Question by:PercivalM
4 Comments
 
LVL 3

Expert Comment

by:ovi_mihai
Comment Utility
the simplest way is using Command Prompt

1 Go to your folder -> press Shift key and Right Click -> choose  "Open Command Window Here"

2 don't be scared of the black window... just type     dir    and press enter    (you can try better:  dir /b   command)

3 you will get the list of the files in that Folder.   Right Click and choose Mark then select the area with the names, it will turn white.. and then you press Enter

4 You can paste that list in excel  And this is it.


Expected problems depending on your system..

1 In the Shift+Right Click the "Open in Command Window" doesn't apear.
   - you will have to go to: Start -> Run -> type:  cmd     and press Enter
   - go to your folder with ex:   D:  then Enter  then use >  cd command
                 like  cd folder   than press Enter
         Example:       d:  <Enter>    cd myfolder  <enter>  cd mysubfolder
 - then type     dir

2. The selection in the cmd window includes the rows from the begining  try: dir /b


There is another way with VB script - which can read a folder directly and is more interactive
Press Alt+F11 and double click a sheet name - then you paste the code
Try http://vbaexpress.com/kb/getarticle.php?kb_id=837

You can download the example there at the bottom
0
 
LVL 1

Expert Comment

by:geff_chang
Comment Utility
ovi_mihai's VBA tool does not work on Excel 2010.

Anyway, another free tool you can use is Directory Lister::
http://www.portablefreeware.com/index.php?id=1157#comments

It can generate a text file for a list of files in selected folders.

:: Then maybe you can just copy the results into Excel.
0
 
LVL 32

Accepted Solution

by:
DrDamnit earned 500 total points
Comment Utility
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now