-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGitMusic.bat
More file actions
54 lines (42 loc) · 1.2 KB
/
GitMusic.bat
File metadata and controls
54 lines (42 loc) · 1.2 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
43
44
45
46
47
48
49
50
51
52
53
@echo off
rem setlocal
REM Path to your existing repo clone
set REPO_PATH=D:\Python\Music_clone
rem Create the target folder (if it doesn't exist)
if not exist "%REPO_PATH%" (
echo Creating target folder...
mkdir "%REPO_PATH%"
)
REM Go to the repo and ensure it is linked to the remote
cd /d %REPO_PATH%
git init
git remote add origin https://github.com/jrsousa2/Python-scripts-for-iTunes-WMP.git
git pull origin main
REM SKIP LINE
echo .
REM FIRST iTunes
copy /y "D:\Python\iTunes\Call_Save_to_Excel.py" "%REPO_PATH%"
:: copy /y "D:\Python\iTunes\Call_Sync_Plays.py" "%REPO_PATH%"
:: copy /y "D:\Python\iTunes\Read_PL.py" "%REPO_PATH%"
copy /y "D:\Python\iTunes\README.md" "%REPO_PATH%"
REM NOW WMP
rem copy /y "D:\Python\WMP\WMP_Read_PL.py" "%REPO_PATH%"
REM SKIP LINE
echo .
REM CHECK IF ALL IS RIGHT BEFORE TRYING TO PUSH THE CHANGES
rem pause
REM PREPARE THE GITHUB REPO
git add .
git branch -M main
git commit -m "Updating selected files"
git push origin main
echo .
echo .
echo VIEWS IF BATCH SUCCEEDED
git log -n 1
rem CD BACK TO ORIGINAL FOLDER
cd D:\Python
REM Give Git a little time to finish any background tasks
timeout /t 3
rem Delete the target folder after operation
rd /s /q "%REPO_PATH%"