In cmd I want to assign the file path of a file say 'test.txt'
to a variable name filePath, complete file location is not know, it is know only up to certain folder so I am using dir /b /a /s "test.txt"
. I am using below syntax :
set filePath=C:\Users\kadamr\AppData\Local\Test>dir /b /a /s "test.txt"
When I echo the value of filePath I get the syntax instead of filePath.
i.e : C:\Users\kadamr\AppData\Local\Test>dir /b /a /s "test.txt"
What I am missing ?