Hi,
My script is running the windows ftp client but after it completes its not following on with the next section, instead its getting stuck in FTP. It's supposed to run
remove-item $GenericFTPFile but the scripots hangs. If I kill ftp.exe in task scheduler I can see FTP has uploaded but the script ends. Is this something I am doing wrong using invoke-expression, is there an alternative?
$GenericFTPFile = 'c:\ftp.txt'
$FTPCMD = 'ftp.exe -i -s:'
$BuiltFTP = $FTPCMD+$GenericFTPFile
$FTPServer = "ftp.rsc-dev.org"
$FTPUser = "user1"
$FTPPAss = "pspsps"
$a = @()
$a += $FTPServer
$a += $FTPUser
$a += $FTPPAss
$a | out-file c:\ftp.txt
invoke-expression $BuiltFTP
remove-item $GenericFTPFile
Alter De Ruine