I'm writing a series of .bat scripts to help with some git-lfs actions such as locking and unlocking files and viewing the currently locked files.
I have successfully written three scripts, one to lock all, one to unlock all, and one to view locks. I now want to make 2 more, to lock/unlock the selected file(s) via the context menu.
I have created a skeleton script, to pass the $FILE input to the bat so i can figure out its format. This script looks like this
set ARG_NUM=0
echo All Args: %*
for %%x in (%*) do (
set /A ARG_NUM+=1
echo Arg %ARG_NUM%: "%%x"
)
echo Number of Files: %ARG_NUM%
I have created a custom action called "Lock File(s)" and set it up like this
However, when I have spaces in file names, the arg passer treats the space as the delimiter, resulting in the file paths/names being sliced apart.
When I try to wrap ${FILE} in double quotes (input looks like "$FILE") only the first selected file is passed into the script.
What is the correct procedure for escaping the values selected in $FILE in order to pass them to another function or script?
I am also facing same issue, we want to integrate it in our POS Terminal software and was facing issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.