I just discovered this https://www.youtube.com/watch?v=HRHymQC_LVs
Gymnopédie - Symphony
www.youtube.com
Phi Kappa Chi ΦΚΧ <a:yeah:589703000977571860><a:ppHop:536353159615086612>
there are code blocks for a reason:LOOP
setlocal ENABLEDELAYEDEXPANSION
FOR /R %%X IN (*.mp3) DO (
IF NOT "%%~dpX"=="!LASTPATH!" (SET /A COUNT=0) ELSE (SET /A COUNT=!COUNT!+1)
SET LASTPATH=%%~dpX
:: make sure we don't rename songs in the root folder
IF NOT "%%~dpX"=="%CD%" (
REN "%%X" song!COUNT!.mp3
ECHO Renamed %%X to song!COUNT!.mp3
)
)
endlocal
:End
PAUSEimport re
for test_string in ['555-1212', 'ILL-EGAL']:
if re.match(r'^\d{3}-\d{4}$', test_string):
print test_string, 'is a valid US local phone number'
else:
print test_string, 'rejected':LOOP
setlocal ENABLEDELAYEDEXPANSION
FOR /R %%X IN (*.mp3) DO (
IF NOT "%%~dpX"=="!LASTPATH!" (SET /A COUNT=0) ELSE (SET /A COUNT=!COUNT!+1)
SET LASTPATH=%%~dpX
:: make sure we don't rename songs in the root folder
IF NOT "%%~dpX"=="%CD%" (
REN "%%X" song!COUNT!.mp3
ECHO Renamed %%X to song!COUNT!.mp3
)
)
endlocal
:End
PAUSE:LOOP
setlocal ENABLEDELAYEDEXPANSION
FOR /R %%X IN (*.mp3) DO (
IF NOT "%%~dpX"=="!LASTPATH!" (SET /A COUNT=0) ELSE (SET /A COUNT=!COUNT!+1)
SET LASTPATH=%%~dpX
:: make sure we don't rename songs in the root folder
IF NOT "%%~dpX"=="%CD%" (
REN "%%X" song!COUNT!.mp3
ECHO Renamed %%X to song!COUNT!.mp3
)
)
endlocal
:End
PAUSE