We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

File names to first column in Excel

Options
Hi, I wonder if anyone can help on this. I need to regularly copy lists of file names from Explore file manager into the first column of an Excel worksheet. What I've been doing till now is highlighting each file then clicking on it to make the name editable, then copying and pasting that into each Excel cell. There must be an easier way for a long list of file names. And I don't want to paste all the file names into one cell. I'm using Excel 2000.
Thanks

Comments

  • I've used Karen's Directory Printer. Set it up to save file names to disk; you can then open that file in Excel and either use that, or if you already have a sheet set up, just copy and paste the filenames.
    "The trouble with quotations on the Internet is that you never know whether they are genuine" - Charles Dickens
  • If i need to do something like this, i'll open up a command prompt (Start menu -> run -> 'cmd') then find the directory and list it's content.. copy and paste from the box and import into Excel.

    But i'm a geek...
  • Thanks for the replies. It seems the way to go is to import a text file of the file names from a directory listing into Excel. Next question. The text file from the directory listing gives info I don't need: date, time, file size then the file name. I need to quickly delete all the stuff before the file name in each row of the text file. I use Notepad++ but it will only select horizontally for deleting. I need to be able to select vertically. Does anyone know of a quick way to select vertically? I know I can do it in Word by dragging the mouse while holding the Alt key but what about text files and text editors?
  • isofa
    isofa Posts: 6,091 Forumite
    You won't need to, open the directory listing text file in Excel, and it'll bring up a Text Import dialog, set it to fixed width (not delimited), and go through the wizard, you'll find the data in different columns, the filenames should be in E. Just remove the columns you don't need.
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    If you can write macros, you can use the DIR command to set a directory and then loop it to read each filename in turn. All you have to do is increase the row number each time you loop to move down a row.
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • tarden
    tarden Posts: 41 Forumite
    Part of the Furniture Combo Breaker
    Open a command window. Navigate to the directory you're interested in using the cd command. When you are in there, enter the following:
    dir /b > tempfile.txt
    That puts a list of the files in the textfile tempfile.txt.
    Open that file in Excel and you're done.
  • Pauls
    Pauls Posts: 752 Forumite
    Open a command window. Navigate to the directory you're interested in using the cd command. When you are in there, enter the following:
    dir /b > tempfile.txt
    That puts a list of the files in the textfile tempfile.txt.
    Open that file in Excel and you're done.

    This'll work perfectly, just make sure you open excel and select 'file/open' otherwise the wizard won't start. You can define which columns you want to keep in this wizard so this solves all of your problems
  • isofa
    isofa Posts: 6,091 Forumite
    Is this post in Groundhog day?!
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244K Work, Benefits & Business
  • 598.9K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.