I need to create sub directories for a list of users. I have the users in a table so I'm able to create a .bat file with the mkdir statements.
I can manually execute this file but I wonder if there is an option to execute this .bat file using TX?
Best answer by Søren SørensenView original
You should be able to execute the .bat file using this PowerShell script. For more info on PowerShell scripts and how to add them as an external executable, please see this guide
We use version 18.104.22.168 and it seems that you need version 6024.
Although I see an External Executable folder in the Execution pane, I can't add a Powershell script or whatever .bat file.
So there is no option at all for our version of TX?
I use xp_cmdshell in pre- or post-scripts at a couple of customer sites (version 20.10.x). It works really well and we have no security concerns in this regard. This is just an example (not a .bat file but you get the gist):
set @Command = 'dir "' + @Folder + '"'
insert into @Dir
exec xp_cmdshell @Command
You might wish to try this while we wait for the migration tool to be released.