I have the following to folders:
V:\100 Migrering til Dalux\ES
E:\ES
I'd like to compare the folder and sub folder names to make sure they are similar.
I've been trying to get the following code to work without success:
$ES = Get-ChildItem -Recurse -path E:\ES
$ES = Get-ChildItem -Recurse -path V:\100 Migrering til Dalux\ES
Compare-Object -ReferenceObject $ES -DifferenceObject $ES
Edit:I get the following error:
Get-ChildItem : A positional parameter cannot be found that accepts argument 'til'. At line:3 char:7
- $ES = Get-ChildItem -Recurse -path V:\100 Migrering til Dalux\ES
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
- FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
'V:\100 Migrering til Dalux\ES'
– Doug Maurer-Directory
to the Get-ChildItem calls – Theo