Click here to Skip to main content
15,312,535 members
Please Sign up or sign in to vote.
1.44/5 (4 votes)
See more:
hello


I have bulk images in folder and i want copy these file name to excel file
Note, I want only all file name not images..........
Posted
Updated 8-Nov-21 2:36am

Let's say you have a folder, C:\Temp\Images and you want all the JPG files from there in a file C:\Temp\MyFileList.csv, you could simply do this from the command line;
C:\dir C:\Temp\Images *.jpg /b > C:\Temp\MyFileList.csv

Then open that file in Excel.

Now, if you want something a bit more automated than that then you need to specify how that should be done (i.e. using a C# program or running a macro/VBA from inside an already existing spread sheet).

Hope this helps,
Fredrik
   
You can open a command prompt (Run>>cmd.exe) and go to the specified folder C:\> cd folder_path
then type this command...
C#
dir > list.txt


If you want filenames only then add /b after dir

C#
dir /b > list.txt


There will be a file namely list.txt will be created in the folder..
You can open it, and copy-paste to Excel...
   
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900