@echo off
::	MakecwRsync_5.5.0.bat
::
set "ShortCutRoot=%HOMEDRIVE%\PortableApps\ShortCut"
set "ShortCutName=ShortCut.exe"
::
set "AppNameRoot=%HOMEDRIVE%\PortableApps\cwRsync_5.5.0_x86_Free"
set "AppName=cwRsync_5.5.0.cmd"
::
set "AppLinkRoot=%PUBLIC%\desktop\PortableApps"
set "AppLinkFile=cwRsync_5.5.0.cmd.lnk"
::
set "AppICON=%AppNameRoot%\rsync.ico"
::

::	2024-08-31
call :Checkdir "%AppLinkRoot%"
::
"%ShortCutRoot%\%ShortCutName%" /T:"%AppNameRoot%\%AppName%" /F:"%AppLinkRoot%\%AppLinkFile%" /I:"%AppICON%" /A:c
echo "%ShortCutRoot%\%ShortCutName%" /T:"%AppNameRoot%\%AppName%" /F:"%AppLinkRoot%\%AppLinkFile%" /I:"%AppICON%" /A:c

if "%~1"=="" (
	%ComSpec% /k
) else (
	%ComSpec% /%~1
)
goto End

::	2024-08-31
:Checkdir
	rem ====----	https://stackoverflow.com/questions/18639663/how-to-pass-command-line-parameters-with-space-in-batch-file

	if exist "%*" (
		exit /b
	)
	if not exist "%*" (
		mkdir "%*"
	)
	if exist "%*" (
		echo "%*" Created
	)
	exit /b

:End
