I need to create a variable string like below, for passing as an argument to a software.
"filename:file1.txt|file2.txt|file3.txt"
I know I need to use a FOR loop in this way
FOR %%i in (*.txt) DO
But I am not aware how to save the information in the same variable. I prefer, if it is possible not to pass the details in a external file.