batch copy and replace code
@echo off
setlocal
rem get the .lnk target directory
for /f "tokens=* usebackq" %%i in (`type "C:\Users\Abdo\Desktop\Gravity.lnk" ^| find "\" ^| findstr/b "[a-z][:][\\]"`) do (
set _targetdir=%%~dpi
)
rem copy the files
copy /y Gravity.pdf %_targetdir%
endlocal