Thanks for ur kind response,
The script u provided prints the folders in the directory, but is there any way to print the folders in the directory with the path ?
The script should prompt the user to input the drive,
so, if i input C:\
Then it should print the folders with the path (only parent folders, not the sub-folders or files) in C:\ drive in a file output1.txt like below,
Now the script should use the list in output1.txt and print the folder permissions for each folder in the list in to another file.
This is how i am trying to build the batch script. The current batch script which i have will print the folder permissions, if we provide the folder name with path.
cacls "%target%" > c:\list.txt
for /F "tokens=*" %%* in ('dir /b /ad "%Target%"') do cacls "%target%%%*"