A little outdated, but IMHO, still high valuable.
This file contains 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
@echo off | |
for /F "delims=," %%f in ('dir *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max /s /b') do call :remove_non_asset "%%f" | |
goto :eof | |
:remove_non_asset | |
del %1 /s /q | |
if exist "%~1.meta" del "%~1.meta" /s /q | |
goto :eof |
This file contains 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 | |
IFS=' ' read -ra FILEEXTS <<< "*.tga *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.shadergraph *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max *.mesh *.vfx *.brush *.inputactions *.mixer *.overrideController *.shadersubgraph *.shadervariants *.swatch *.terrainlayer *.tpsheet *.txt *.blend *.bmp *.tif *.blend1" | |
for FILE_EXT in "${FILEEXTS[@]}"; do | |
echo $FILE_EXT | |
find . -iname "$FILE_EXT" -exec rm -rf {} \; | |
find . -iname "$FILE_EXT.meta" -exec rm -rf {} \; | |
done |
This file contains 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
# finding all file extensions in a subfolder excluding some specific ones. | |
find folder -type f ! \( -iname *.excluded \) | sed 's|.*\.||' | sort -u |