Answer the question
In order to leave comments, you need to log in
How to recursively compare 2 folders in Windows and get information, including those files and folders that are not accessible?
Experimented with the robocopy utility.
I have created a closed_folder_parent folder. I put 3 pictures in there. And a closed_folder folder with 3 text documents. In Properties -> Security for closed_folder, I set "Deny" everywhere (for all users). And in closed_folder I put the folder some_folder with the text document some_txt.txt.
Here is the structure.
closed_folder_parent
-- closed_folder
-- some_folder
-- some_txt.txt
-- robocopy.txt
-- robocopy_programming_v.txt
-- sort.txt
-- ошибка powershell.png
-- ПРЯМОУГОЛЬНИК.png
-- Сбой.png
robocopy D:\closed_folder_parent D:\test /e /V /TS /FP /ETA /TEE /r:1 /w:1 /LOG:D:\robocopy.txt /MIR
ВсегоСкопировано ПропущеноНесоответствие СБОЙДополнения
Каталогов : 3 1 1 0 1 0
Файлов : 3 3 0 0 0 0
$1 = Get-childitem "D:\test" -recurse
$2 = Get-childitem "D:\closed_folder_parent" -recurse
Compare-Object $1 $2 -Property Name, Length
Get-childitem : Отказано в доступе по пути "D:\closed_folder_parent\closed_folder".
строка:1 знак:6
Answer the question
In order to leave comments, you need to log in
That is, Power Shell is not an assistant here. What other options are there?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question