Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Problems with directory traversal

$
0
0

Hello,

I've recently started learning PowerShell and I've been running into some problems with this piece of code: pastebin.com/NRDjXKvW .

This is a part of the output i'm getting: 

D:\workspace\ASC
0

D:\workspace\ASC\tema1
1

D:\workspace\ASC\tema1\.idea
1

...etc. Where is that 0 and 1 coming from ? I keep getting errors "Get-Item : Cannot find path 'C:\Users\Kingaap\1' because it does not exist." Because of that.

And another thing, why isn't indent changing? I'm clearly passing $indent+1 in the inside function call.



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>