Last active
March 22, 2025 19:21
-
-
Save StudioEtrange/175755cb5d469f380fc5a041692e7b21 to your computer and use it in GitHub Desktop.
Various files and folders manipulation
move all files, folder and subfiles of a root folder inside this root folder in a flatten way
-
linux :
- https://unix.stackexchange.com/a/493548
- take care of duplicated files
cd /FOLDER find . -mindepth 2 -type f -exec mv -t . --backup=t '{}' +
-
windows :
cd /D X:\FOLDER for /D %A in ("*") do @for %B in ("%~fA"\*.*) do move /y "%B" "%~dpB..\"
-
linux :
cd /FOLDER for f in *; do mkdir "${f%.*}"; mv "$f" "${f%.*}"; done
-
windows :
set "FOLDER=X:\FOLDER" for /r "%FOLDER%" /d %F in (.) do @dir /b "%F" | findstr "^" >nul || echo %~fF && rmdir /Q "%~fF"
register this setting in windows registry : https://github.com/StudioEtrange/windows-explorer-open-file-background-location
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment