标题: 求批量扫描游戏并创建快捷方式脚本
[打印本页]
作者: jiulong
时间: 2008-5-8 20:14
标题: 求批量扫描游戏并创建快捷方式脚本
如题
先用for 结合dir扫描游戏执行文件然后用 %~fi获取路径,但这条命令不完美,因为执行文件太多
疑点:能创建快捷方式了但还得手工一个一个改中文名,所以可以用%:~n%来获取中文目录(大部分人的习惯吧),不知这样做行不行得通
给出个本BBS搜出的代码,可以说太烂了,所有执行文件都创建LNK了,并且以执行文件命令LNK。
@echo off
echo 正在扫描硬盘文件,请稍候.......
@echo TempMode >short
@echo Silent=1 >>short
@echo Overwrite=2 >>short
for /f "delims=\ tokens=1,2,3,4" %%a in ('dir /b /s D:\*.exe') do Echo shortcut=D,"%%a\%%b\%%c\%%~nxd","","","%%c">>short
C:\Progra~1\winrar\rar.exe a -sfx c:\short.exe nul -z <short
start C:\short.exe
exit
希望高手能给出个好的代码,小弟在此谢过
另希望给个批量修改LNK路径批处理,比如d:\tencent\qq\qq.exe d:\tencent\qqgame\qqgame.exe d:\tencent\qq飞车\qq飞车.exe
路径全改为:d:\netgame\qq d:\netgame\qqgame d:\netgame\QQ飞车
Last edited by jiulong on 2008-5-8 at 08:20 PM ]
作者: jiulong
时间: 2008-5-8 20:17
为质量起见,特加个要求
最好能排除un*.exe,up*.exe
有两个执行文件分别为,game.exe、onlinegame.exe取目录有ON开头或结尾,其它全部排除。
谢了