![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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) |
| Guest | 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) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's file's full path and BIOS | davidjchuang | Vista file management | 7 | 03-22-2008 11:22 AM |
| Vista search does not display path to items listed in results | Saddlemountain | Vista file management | 2 | 12-04-2007 07:34 AM |
| Full path in the Address bar of Explorer??? | Noozer | Vista installation & setup | 1 | 10-17-2006 09:03 PM |
| BUG/ANNOYANCE: PoSH autocompletes the full path rather than a minimal path | Adam Milazzo [MSFT] | PowerShell | 2 | 08-12-2006 03:14 AM |
| full path versus ./filename | Singee | PowerShell | 5 | 06-07-2006 03:27 AM |