
批處理怎樣搜索PC機上的游戲信息需要用批處理搜索PC機上的游戲 并獲得 文件路徑 文件名創建時間 PC機IP地址
在添加獲得 文件創建日期時 沒有試成功一直報錯 求高手指導下,或者重寫個更簡潔明了的代碼外分感謝nclick="copycode($('code0'));">復制代碼
- @echo off
- for /f tokens=15 %%i in ('ipconfig /all ^| find /i ip address') do set ip=%%i
- if exist C:ftp%ip%-%date:~0,10%.txt del /q C:ftp%ip%-%date:~0,10%.txt
- set filename1=llk
- set filename2=僵尸
- set filename3=tank
- set filename4=坦克
- set filename5=斗地主
- set filename6=祖瑪
- set filename7=串串燒
- set filename8=Virtuanes
- set filename9=小說
- set filename10=plant
- set filename11=angrybirds
- set disk=c d e
- rem按文件名稱查找
- for %%j in (%disk%) do (for /f delims= %%i in ('dir /s/b/a-d %%j:*%filename1%*') do echo %%~nxi,%%i,%ip%,%%~ti>>C:ftp%ip%-%date:~0,10%.log )

