![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | how to get subdir items with full path name? I'm new to powershell, How to get subdir items with full path name? Thank you! |
My System Specs![]() |
| | #2 (permalink) |
| | Re: how to get subdir items with full path name? Benny ha scritto: > I'm new to powershell, > > How to get subdir items with full path name? > > > Thank you! Some examples. For a specific Path: get-childitem C:\ | foreach-object -process { $_.FullName } >From current directory and recursive: get-childitem -recurse | foreach-object -process { $_.FullName } >From current directory, including hidden files/dirs and recursive: get-childitem -recurse -force | foreach-object -process { $_.FullName } Ciao! Claudio |
My System Specs![]() |
| | #3 (permalink) |
| | Re: how to get subdir items with full path name? I just like to add that there are also some shortcuts that are not so verbose: ![]() "ClaudioG64" wrote: > For a specific Path: > get-childitem C:\ | foreach-object -process { $_.FullName } gci C:\ | % { $_.FullName } > From current directory and recursive: > get-childitem -recurse | foreach-object -process { $_.FullName } gci -r | % { $_.FullName } > From current directory, including hidden files/dirs and recursive: > get-childitem -recurse -force | foreach-object -process { $_.FullName } gci -r -fo | % { $_.FullName } -- greetings dreeschkind |
My System Specs![]() |
| | #4 (permalink) |
| | Re: how to get subdir items with full path name? "Benny" <DongDong.Wang@gmail.com> wrote in message news:1161156839.805978.153610@m73g2000cwd.googlegroups.com... > I'm new to powershell, > > How to get subdir items with full path name? If you want just the name (ie a string object is OK) then just use: gci . -name or gci . -recurse -name Be aware that this will emit System.String objects instead of System.IO.FileInfo/DirectoryInfo. -- Keith |
My System Specs![]() |
| | #5 (permalink) |
| | Re: how to get subdir items with full path name? >I just like to add that there are also some shortcuts that are not so >verbose: Here is one for you: ${function:...} = { process { $_.($args[0]) } } gci c:\ | ... fullname Enjoy! |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to get the full path for the PS1 itself? | PowerShell | |||
| What's file's full path and BIOS | Vista file management | |||
| Full path in the Address bar of Explorer??? | Vista installation & setup | |||
| BUG/ANNOYANCE: PoSH autocompletes the full path rather than a minimal path | PowerShell | |||
| full path versus ./filename | PowerShell | |||