I am trying to get a list of file names and their corresponding file sizes (files are on my local drive) onto an excel spreadsheet, I am able to get the file names listed onto the excel spreadsheet.
However, now for the next step, I have no idea on how to proceed: I think its the fact that I do not know the command/s for it? for example, how I need to utilise “System.IO.Path.GetFileName(item)” to get the file names - I just don’t know the file size equivalent. I have tried adding “.Length” to the end of “System.IO.Path.GetFileName(item)” but I keep getting some error.
If anyone could help me, I would appreciate it. Thanks!