I am facing an issue that the quotes includes parentheses and a star (*) and no clue how to avoid it as I always get error message (1204).
I want to use the Send Event script however I would like to use a variable as well. I split the text into two parts and in the middle the variable takes place.
Here is the full quote that goes to command line:
cmd c/ (for %F in (C:\Folder\*) do @echo %~dpF) >dir.txt