I have a server that has over 600 GB of data on one of the drives.
I need to list all the files from the folders and subfolders and export that to notepad or to Excel.
command linewindows-server-2003
I have a server that has over 600 GB of data on one of the drives.
I need to list all the files from the folders and subfolders and export that to notepad or to Excel.
Best Answer
Quick and dirty in PowerShell:
This will output something similar to this:
If you add
-name
to the command somewhere afterdir
but before the|
then you get the following:You may also want to include a
-force
after the-recurse
as this will show Hidden and System files as well.Be warned, this file will be large. I ran this against the C:\ of my work computer and it generated a 45MB txt file. That's excluding all the folders my user account doesn't have access to.