I am using following script but it is giving syntax error. Can somebody tell me what is the issue here?
@echo off
SETLOCAL EnableDelayedExpansion
SET test=
dir /s /-c /a | find "Directory" >> path.txt
for /f "tokens=* delims= " %%a IN (path.txt) do
(
Set test=%%a
Set test=%test:Directory of =%
echo !test!
)