• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1065
  • Last Modified:

name and size (bytes) of files in folders/subfolders in excel sheet

Hi,

I want to get name and size (bytes) of files in folders/subfolders in an excel sheet. How can I do that?
0
baberamin
Asked:
baberamin
2 Solutions
 
jvuzCommented:
Can this help?

http://www.ehow.com/how_5746409_convert-folder-list-word-excel.html

Instructions

       

1. Open a command line window by clicking "Start" on the task bar, clicking "Run" in the start menu and then entering "cmd" in the Run box that appears.
2. In the command line, navigate to the folder containing the items you want to list using the CD command (for example, CD \ will move to the root folder, or use CD \<folder> to move to the given folder).
3. Run the following DIR command: "DIR *. > list.txt" to generate a list of all files with no extension (a list of just the folders) and save it in the file list.txt. The DIR command has many other parameters that can be applied to give listings in different formats, different sort orders and to even list files in all sub-folders. Use the command "DIR /?" to get a summary of the options.
4. Locate the file list.txt on your computer and right-click on it. From the pop-up menu, click "Open With," then click on "Choose Program." In the Choose Program dialog, locate Microsoft Word and click on it. Click "OK." The file can now be edited and formatted just as any other Word document.
5. Open the output file in Excel by first launching Excel, then click on the "Data" tab at the top and click the "From Text" button.
6. Browse to the output file and double-click on it. In the "Import Text Wizard" dialog that comes up, choose the "Fixed Width" option and click the "Next" button. On the next screen, in the "Data preview" portion, click on the line at position 50 and drag it off of the white area to remove it. When the lines are positioned correctly, click "Next." Click the "Finish" button to finish the text import wizard. The file will now be imported with the file date in column A, the time in column B, the file size in column C and the file name in column D.


Read more: How to Convert a Folder List Into Word or Excel | eHow.com http://www.ehow.com/how_5746409_convert-folder-list-word-excel.html#ixzz24jwas5EN
0
 
arnoldCommented:
Are you familiar with vbscript?

http://msdn.microsoft.com/en-us/library/2z9ffy99(v=vs.84).aspx

http://www.go4expert.com/forums/showthread.php?t=927
You can add attribute to get the size of the file and whatever other Parameters you want.
http://ss64.com/vb/filesystemobject.html
0
 
mrandalCommented:
With the Swiss File Knife command line tool, it's
sfk list -size -tabs mydir +tofile out.csv
to list all files of mydir, including subfolders, with their sizes as tab separated CSV data. just import or open the created out.csv with Excel. When asked for a separator character, select Tab.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now