yaml_1_esphome_get_copy_move_date_folder.bat
@echo off
set "source=\\192.168.1.114\config\esphome"
set "destination=E:\hassio\dailies"
REM Get the current date in YYYYMMDD format
for /F "tokens=1-3 delims=/ " %%a in ('date /T') do set "date=%%b-%%c-%%a"
REM "date=%%c%%b%%a"
REM Create a folder with the current date as the title
mkdir "%destination%\%date%\esp-homes"
REM Move files with "lovelace" in the name to the created folder
copy "%source%\*.yaml" "%destination%\%date%\esp-homes\"
echo Files moved to "%destination%\%date%\esp-homes\" folder.
Editor is loading...
Leave a Comment