Swami (ch********@gmail.com) writes:
I'm trying to write a trigger that on the insert/update of a column, I
want a directory to be created. If insert then create or if update
rename existing dir. Has anyone done thins before? Any pointers would
be appreciated.
You could call xp_cmdshell to do the task. But this may have some
obstacles, if plain users are running it. And if many rows are
inserted/updated at the same time, you will have to loop over the
inserted table and call xp_cmdshell for each row. That is not good
for performance.
But this is a kind of odd thing to do. Maybe you could explain what your
business problem is for alternative solutions.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp