Created
June 16, 2025 21:50
-
-
Save srgpsk/39bc0d3e9674282b8c515ddf49fd8c80 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wsl_dir="/home/youruser/somefolder" | |
win_dir="$(wslpath -w "$wsl_dir")" | |
find "$wsl_dir" -type f | while read -r file; do | |
win_file=$(wslpath -w "$file") | |
powershell.exe -Command "(Get-Item '$win_file').Attributes += 'Archive'" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment