I want to get a list of the folders in a certain directory.
Here's how I'm trying to do it:
for /d %%a in (*) do dir "c:\Users\cowman\FolderA" /a:d /o:n /b "%%a" >> get_dirs.txt
This gives me a list of all the folders in FolderA. However, it unfortunately lists the folders multiple times. I only want them listed one time. How do I get them listed one time ?