Try the following checks before and after moving/copying:
- Check File Attributes
attrib "\\server\share\problemfile"
Look for unusual flags like O
(offline), E
(encrypted), C
(compressed), etc.
- Check for Alternate Data Streams
Get-Item -Path "\\server\share\problemfile" -Stream *
If there are streams beyond :$DATA
, note them.
- Check for Reparse Points
fsutil reparsepoint query "\\server\share\problemfile"
If this returns data, the file is a link or stub.
- Check Owner and Integrity
Look for differences in owner, integrity, or audit sections. Bulk "Normalize" Files: Use a tool likeicacls "\\server\share\problemfile" /L /C
robocopy
to copy files in a way that strips unwanted metadata:
Then move them back after verifying access.robocopy \\server\share \\server\share_temp /E /COPY:DAT
- Remove Problematic Attributes: If you find a specific attribute causing the issue, you can clear it using PowerShell or command-line tools.
- Check for Reparse Points: If these are cloud/DFS stubs or links, ensure files are fully hydrated and not placeholders.