sergi0
Hi I am pretty new to using PowerShell 2.0. I am trying everything I can to learn it quickly; however, I've been trying to learn how to use the Out-File to more or less print or save to a file a particular file tree. When I run the command (PS C:\1> out-file -filepath c:\testoutfile.txt) the command creates the file I specified (testoutfile.txt) but none of the data I have in my folder are not displaying on my out-file results it's just a blank text file. In a nut shell, how do I use the Out-file command to print out or save to a file a folder tree structure. Thanks for your help.
----------------------------
#26 Jul 2011 23:01
Simon Sheppard
Code: Select all
$stuff = dir -recurse "C:\work\" | select fullname
$stuff | out-file F:\found.txt
Code: Select all
$stuff = dir -recurse "C:\work\" | select fullname
$stuff > F:\found.txt
To see all the properties and methods available use
dir | get-member