The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

OliverTwist (3) [Avatar] Offline
#1
I need an output when recussing an directory that is in path+filename format only. For example,
c:inetpubwwwrootsiteaa.html
c:inetpubwwwrootsite.git
c:inetpubwwwrootsitezabc.jpg
c:inetpubwwwrootsitea1dog.aspx
ext...
finked@hotmail.com (10) [Avatar] Offline
#2
Re: Out put from a directory listing that is set with Recussive
Does this do what you need?

dir -Recurse -Name
OliverTwist (3) [Avatar] Offline
#3
Re: Out put from a directory listing that is set with Recussive
Close, I would have to determine where I am at and build a full path from the root of the drive I am on. not a big deal. I am just learning Powershell. I guess I will have to add, concat the pwd +"" to the result I get.
OliverTwist (3) [Avatar] Offline
#4
Re: Out put from a directory listing that is set with Recussive
I am assuming that
$a = Get-ChildItem -Recurse -Name
will return an array of relative paths and file names. To have a full path and file name would require
$b = Get-Location
for each item in the array I would either have to process each one, one at a time or make a new array. for one item
$d = [string]::Concat($b,'\',$a[0])

Question is there a way to create the array with both peace's of data and not use a second array?
finked@hotmail.com (10) [Avatar] Offline
#5
Re: Out put from a directory listing that is set with Recussive
dir CsmilieoSHScripts -Recurse | select fullname