0

I am trying to open two instances of msftpsrvr.exe(CoreFtp) on my local system simultaneously using powershell. I have two .bat files to handle that but once i run it in a function, it overrides the earlier one.

I tried with Start-Process with -Wait but it doesn't proceed to the next step until manual intervention.

function StartSFTP
{
   Start-Process -FilePath "C:\SFTP\XXX-in-Reg.bat" -Wait

   Start-Process -FilePath "C:\SFTP\XXX-out-Reg.bat" -Wait
}

I tried with the workflow RunScripts(solution given on stack overflow) but to no luck.

function StartSFTP 
{
   Start-Process -FilePath "C:\SFTP\XXX-in-Reg.bat" 

   Start-Process -FilePath "C:\SFTP\XXX-out-Reg.bat"
}

Current output is it opens two windows of Coreftp having XXX-in-Reg.bat credentials(port no. and path)

I am pretty much learning this powerful language and hope I was clear in stating my problem.

0 Answers0