Yes, its possible and better way to write .BAT Batch files for ease of reading and ease of changing values & arguments.
2 major flaws happened and got resolved.
A) The SPACES in the SET commands were causing issues
The equal sign must be immediately after the variable name. SET MYVAR="List.txt"
From the article on SET linked by Frank Thomas above,
https://ss64.com/nt/set.html
"Any extra spaces around either the variable name or the string, will not be ignored, SET is not forgiving of extra spaces like many other scripting languages.". so your command would probably work if you entered ln --list %MYVAR % (a space following the 'R'), since the trailing space became part of the variable name
B) The "Quotes" in the Long Paths need a solution I found elsewhere.
To have long paths required part of this linked insight and hence pulled part of the answer information from here:
https://stackoverflow.com/a/55951234/1937901
If you need to concatenate paths with quotes, you can use = to replace quotes in a variable. This does not require you to know if the path already contains quotes or not. If there are no quotes, nothing is changed.
@echo off
rem Paths to combine
set DIRECTORY="C:\Directory with spaces"
set FILENAME="sub directory\filename.txt"
echo %DIRECTORY%
echo %FILENAME%
rem This is just to illustrate how the = operator works
set DIR_WITHOUT_SPACES=%DIRECTORY:"=%
echo %DIR_WITHOUT_SPACES%
rem Combine two paths
set COMBINED="%DIRECTORY:"=%\%FILENAME:"=%"
echo %COMBINED%
Using the above example, this was leveraged to create & concatenate Path strings using SET and then pushed as commandline arguments to ln.exe
SET FolA1="..Folder Sub Path 1.."
SET FolA2="..Folder Sub Path 1.."
SET SrcRoot="C:\Users\UserName\AppData\Roaming\ApplicationName\Backups"
SET DstRoot="S:\HL_TEST\LN"
SET DstCountFol="003--includedir--cp-bk"
SET DstLog=%DstCountFol:"=%_Log.txt
SET DstPlus=%DstRoot:"=%\%DstCountFol:"=%
SET SrcA1=%SrcRoot:"=%\%FolA1:"=%
SET SrcA2=%SrcRoot:"=%\%FolA2:"=%
SET DstA1=%DstRoot:"=%\%DstCountFol:"=%\%FolA1:"=%
SET DstA2=%DstRoot:"=%\%DstCountFol:"=%\%FolA2:"=%
ECHO %SrcA1%
ECHO %SrcA2%
ECHO %DstA1%
ECHO %DstA2%
ECHO ON
ln --progress --json --output %DstLog% --source %SrcA2% --destination %DstA2% --backup --copy %SrcA1% %DstA1%
This was the final command line for LN.exe in Batch file called with Longer Path Variables as arguments.
ln --list %MYSR %
(a space following the 'R'), since the trailing space became part of the variable name.