Windows 7 Folder contents exported

lard

New Member
So I guess this is probably not the right place for this, but frankly I don't know where to look! I'm trying to get a list of folder contents (preferably including sub folders), so literally just the file names, exported as a text file or csv, or something that I can manipulate the data with.

Any help or signposting would be much appreciated!! Thanks :)
 
In powershell

$files = Get-ChildItem -Path "C:\Somefolder" -Recurse

foreach ($file in $files)
{
Out-FIle -InputObject $file.FullName -Encoding Ascii -Append -FilePath $env:Userprofile\desktop\output.txt
}
 
Back
Top