@echo off
@ set param=%1
@ if not defined param (
echo Usage: ll FILE
@goto End
)
@ set file_path="%cd%"
@ set file_name=%1
@if exist %1 (
@for /f "delims=" %%i in ("%1%") do (
@ set file_path=%%~dpi
@ set file_name=%%~ni
)
@if not defined file_name (
@echo on
echo Error: %1 not File.
@echo off
@goto End
)
) else (
@if not exist %cd%/%1.exe (
@echo on
echo Error: %1.exe not exist.
echo %cd%
@echo off
@goto End
)
)
@ echo @ setlocal > %~dp0%file_name%.bat
@ echo @ set PATH=%%PATH%%;%file_path%; >> %~dp0%file_name%.bat
@ echo @ %%~n0.exe %%* >> %~dp0%file_name%.bat
:End
@echo on
11-13
11-13
11-13