Link to home
Start Free TrialLog in
Avatar of wordtool
wordtool

asked on

xp_commandshell

Using xp_commandshell how do I just get file/folder names without the attributes and the lines without the Drive volume information into a table?
Avatar of mcmonap
mcmonap
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi wordtool,

Use Lowfatspread's code and change the dir to use the parameters "/ad /b", so:

exec master.dbo.xp_cmdshell "dir c:\windows /ad /b"
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wordtool
wordtool

ASKER

Thanks!