mokomoji
2021-11-05 11:52:47 UTC
z_sample.cmd - make test environment directory & file
----------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"
set "z_mdpath=.\MYSLIDES\ZZZ\33-xxxiii"
set "z_rdpath=.\myslides\
rd /s /q "%z_rdpath%"
md "%z_mdpath%
echo %z_mdpath%\11.jpg>".\MYSLIDES\ZZZ\zzzz.txt"
echo %z_mdpath%\11.jpg>"%z_mdpath%\11.jpg"
endlocal
pause
------------------------------------------------------------
u'r cmd edit
------------------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"
set "z_target=.\myslides\zzz"
set "z_forpath=.\myslides\zzz\zzzz.txt"
FOR /F "eol=; delims=" %%J IN (%z_forpath%) DO (
echo TRYING : Xcopy /F "%%~J" "%z_target%"
XCOPY /F "%%~J" "%z_target%\"
echo.
)
endlocal
pause
-------------------------------------------
u'r path
set "z_target=c:\myslides\zzz"
set "z_forpath=c:\myslides\zzz\zzzz.txt"
----------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"
set "z_mdpath=.\MYSLIDES\ZZZ\33-xxxiii"
set "z_rdpath=.\myslides\
rd /s /q "%z_rdpath%"
md "%z_mdpath%
echo %z_mdpath%\11.jpg>".\MYSLIDES\ZZZ\zzzz.txt"
echo %z_mdpath%\11.jpg>"%z_mdpath%\11.jpg"
endlocal
pause
------------------------------------------------------------
u'r cmd edit
------------------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"
set "z_target=.\myslides\zzz"
set "z_forpath=.\myslides\zzz\zzzz.txt"
FOR /F "eol=; delims=" %%J IN (%z_forpath%) DO (
echo TRYING : Xcopy /F "%%~J" "%z_target%"
XCOPY /F "%%~J" "%z_target%\"
echo.
)
endlocal
pause
-------------------------------------------
u'r path
set "z_target=c:\myslides\zzz"
set "z_forpath=c:\myslides\zzz\zzzz.txt"