September 10, 2014 at 2:05 pm
I have an SSIS script task which uses VB.NET code to create 3 things:
1) a folder in the user's %temp% folder
2) a .bat file, containing a command line to open a PSFTP.EXE executable and pass some username, password, and script file information.
3) a .txt file, which is the script to run.
When I use the script task to run the batch file (either by Shell or Process.Start), I can see the batch file opening and running with NO errors. If I take screenshots of it, all responses from server look normal. But, the expected file is not downloaded into the folder from the SFTP site.
Now, I double click manually on that exact same .bat file, and it runs exactly the same, everything identical, except the file DOES get downloaded from the SFTP site.
Any ideas ?? This seems theoretically impossible? The MGET command inside the script is not even specifying a download folder, so I don't think it can be that - it's using the 'local' folder (where PSFTP.EXE resides). So theoretically, manually running the same batch file ought to have identical results as Shelling out the same batch file..Right ??
September 10, 2014 at 2:36 pm
Edit - FINALLY figured it out. Despite the fact that the BAT file is in the certain local folder, and that final BAT file opens a PSFTP in that same local folder and thus I expected PSFTP to recognize that and the FTP server to send data into that local folder, the file was actually being downloaded into another "local folder" -- as defined by the original calling application. In this case, C:\users\me
Stupid me, and stupid windows 7, I searched for this file hours ago in other locations but of course Win7 search function is about as reliable as a chocolate fireman...
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply