-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtidy.bat
More file actions
42 lines (36 loc) · 1.22 KB
/
tidy.bat
File metadata and controls
42 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
set TARGET=D:\Tmp\_cloudclusters
echo Cleaning Python cache and Git files in %TARGET%
echo.
REM ---------------------------------------------------
REM Delete all .pyc files
REM ---------------------------------------------------
echo Deleting .pyc files...
for /r "%TARGET%" %%f in (*.pyc) do (
del /f /q "%%f"
)
REM ---------------------------------------------------
REM Delete all __pycache__ folders
REM ---------------------------------------------------
echo Deleting __pycache__ folders...
for /d /r "%TARGET%" %%d in (__pycache__) do (
rd /s /q "%%d"
)
REM ---------------------------------------------------
REM Delete .git folders
REM ---------------------------------------------------
echo Deleting .git folders...
for /d /r "%TARGET%" %%d in (.git) do (
rd /s /q "%%d"
)
REM ---------------------------------------------------
REM Delete git-related files
REM ---------------------------------------------------
echo Deleting git files...
for /r "%TARGET%" %%f in (.gitignore) do del /f /q "%%f"
for /r "%TARGET%" %%f in (.gitattributes) do del /f /q "%%f"
for /r "%TARGET%" %%f in (.gitmodules) do del /f /q "%%f"
for /r "%TARGET%" %%f in (.github) do del /f /q "%%f"
echo.
echo Cleanup complete.
pause