August 12, 2009 at 6:37 pm
Hello All,
Is there a way to Create, Rename and Delete file folder thru SQL Server?
Thanks.
August 12, 2009 at 6:57 pm
Take a look at xp_cmdshell command on BOL.
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
August 12, 2009 at 8:54 pm
You'd be better off doing this in Powershell or VBScript and calling the script from T-SQL if you need to.
August 13, 2009 at 6:17 am
Thank you melton for your suggestion, I will look into xp_cmdshell.
Steve, How do I call vbScript from SQL? Thanks for your time.
August 13, 2009 at 7:53 am
xp_cmdshell or an Agent Job.
T-SQL works within the server. It cannot see anything outside of the SQL service without a shell like xp_cmdshell.
You would use the same commands that you would use from a Command Prompt window.
September 10, 2010 at 10:57 am
Please what is BOP?
September 10, 2010 at 11:27 am
BOL is SQL Server Books OnLine. If you Google "BOL SQL" and click "I'm feeling lucky" it will take you right there.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 4:40 pm
Thank you Mr Allen
September 12, 2010 at 2:00 pm
Steve Jones - Editor (8/12/2009)
You'd be better off doing this in Powershell or VBScript and calling the script from T-SQL if you need to.
I know it's an old post but I have to ask...
Why? :blink: What are the advantages to doing it that way over, say, just calling some good ol' fashioned DOS commands from xp_CmdShell?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply