?
Solved

Coping File names into Excel

Posted on 2011-03-11
4
Medium Priority
?
346 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
3 Comments
 
LVL 3

Expert Comment

by:ovi_mihai
ID: 35106591
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
ID: 35107065
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 2000 total points
ID: 35187122
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

829 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