HI dostips batch scripters experts..
do anyone know how to create multiple "FILES shortcut" on the same prefix file names!!
for example;
c:\documents\report\Pic A1.pdf
c:\documents\report\Pic A23.pdf
c:\documents\report\Pic A345.pdf
i have the common name as 'Pic A' but how do i create the
"files shortcut" for the fix prefix using just short scripts??
my scripts show below;
SET /P fn=Pic A
"%windir%\system32\shortcut.exe" -n c:\documents\"%fn%" "c:\documents\report\"%fn%"*.pdf"
so that it will be like below;
c:\documents\Pic A1.lnk
c:\documents\Pic A23.lnk
c:\documents\Pic A345.lnk
thanks in advance!!!
Create multiple 'FILES shortcut' on same prefix name!!
Moderator: DosItHelp
Re: Create multiple 'FILES shortcut' on same prefix name!!
Code: Select all
@echo off
set "location=c:\documents\report"
set "link=c:\documents"
set /p fn=Enter prefix, ex.: Pic A
pushd "%link%"
for %%i in ("%location%\%fn%*.*") do (
shortcut.exe -f -t "%%i" -n "%%~ni" -d "%location%"
)
popd