We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
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

cwoodham
Posts: 432 Forumite
in Techie Stuff
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
Thanks
0
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 Dickens0
-
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...0 -
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?0
-
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.0
-
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.0 -
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.0 -
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 problems0 -
Is this post in Groundhog day?!0
-
This discussion has been closed.
Confirm your email address to Create Threads and Reply

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