我写了个用shortcut.exe写了个批量建立快捷方式p:
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "delims=" %%i in ('dir /b/s "D:\Progra~1\*.exe"') do (for /f "delims=" %%j in ('dir /b "%%i"') do D:\Shortcut\Shortcut\shortcut.exe /f:"D:\Shortcut\Program Files\%%j.lnk" /a:c /t:"%%i"))
但是该p会对制定目录下的全部.exe文件创建快捷方式。如:uninstall.exe
请高手给些过滤非主程序的思路(当然给出代码最好)!
发现一个问题:大部分非主程序文件的图标都是exe文件默认的那个,而主程序都有自己的图标,看能不能通过这个过滤(怎么写代码)?
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /f "delims=" %%i in ('dir /b/s "D:\Progra~1\*.exe"') do (for /f "delims=" %%j in ('dir /b "%%i"') do D:\Shortcut\Shortcut\shortcut.exe /f:"D:\Shortcut\Program Files\%%j.lnk" /a:c /t:"%%i"))
但是该p会对制定目录下的全部.exe文件创建快捷方式。如:uninstall.exe
请高手给些过滤非主程序的思路(当然给出代码最好)!
发现一个问题:大部分非主程序文件的图标都是exe文件默认的那个,而主程序都有自己的图标,看能不能通过这个过滤(怎么写代码)?
