Reputation: 43
I'm using dir to retrive all directories from specified path but I'm getting directories paths from two locations.
dir "C:\ssis" /b /s /ad *.* | sort >c:\ssis\task4\content.txt
And result is
I want to get only marked (yellow) lines. Not directories from place where I open CMD
Thanks :) PM
Upvotes: 0
Views: 473
Reputation: 69505
remove *.*
:
dir "C:\ssis" /b /s /ad | sort >c:\ssis\task4\content.txt
Because you specify the directory where you want to list the files earlier "C:\ssis"
so *.*
will also list files in actual directory.
Upvotes: 2