LFMSupport
asked on
System Sp to get filename
Hello,
Does anyone know of a Sp which will give me the names of all the files in any given folder?
cheers,
Wilky.
Does anyone know of a Sp which will give me the names of all the files in any given folder?
cheers,
Wilky.
AFAIK, there isn't one - I would be surprised if I was proved wrong.
xp_cmdshell 'DIR /B C:\yourfolder'
will return them but you may have to clean the output a little
will return them but you may have to clean the output a little
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> I would be surprised if I was proved wrong. <<
Famous last words :)
Famous last words :)
DIR /? gives you the full list of switches for the DIR commmand.
So you can also use
DIR /A-D /B C:\yourfolder
to exclude folders from the list.
So you can also use
DIR /A-D /B C:\yourfolder
to exclude folders from the list.
ASKER
Thanks nmcdermaid!