Does anyone know how to change the directory using xp_cmdshell and then execute a cmd file from that directory?
I tried the following:
Well Done is better than well said
- Ben Franklin
I tried the following:
Code:
xp_cmdshell [COLOR=red]'c:\abcdef\file.cmd'[/color] [COLOR=green]--fails
[/color][COLOR=green]--and
[/color]xp_cmdshell [COLOR=red]'cd c:\abcdef && file.cmd'[/color] [COLOR=green]--fails
[/color][COLOR=green]--and some other stuff I can't remember right now
[/color]
Well Done is better than well said
- Ben Franklin