我的批处理如何处理路径示例中的空间:
C:\Documents and Settings\K\Desktop\新建文件夹
@echo off
pushd "%~dp0"
IF EXIST "%1" GOTO DECODE_INDIVIDUAL
:DECODE_MULTIPLE
xcopy /s /c /d /e /h /i /r /y "%cd%\encoded" "%cd%\decoded\"
dir "%cd%\decoded\*.php" /A:-D /B /O:N /S >> "%cd%\filelist.txt"
@echo on
for /F %%e in ("%cd%\filelist.txt") do ( copy "%%e" "bin\file.php" && "php.exe" "bin\decoder.php" "bin\file.php" && move "bin\file.php" "%%e" && del "bin\file.php")
del /Q "%cd%\filelist.txt"
GOTO DECODE_END
:DECODE_INDIVIDUAL
@echo on
"php.exe" "%cd%\bin\decoder.php" "%1"
:DECODE_END