![]() | |
#111
| |||
| |||
|
|
That's what I do. I create a ftpcommadn through the activex. Make sure sendftp.bat and the command file are in teh samae directory. But because you now use the Execute Process Task , you must delete these lines: Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing the ftp -s etc. is now inside the sendftp.bat the ftpcommandfile i'm referring to is your strFTPScriptFileName M. On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: I am writing something like this on my first ActiveX code... Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True) objMyFile.WriteLine ("open " & strFTPServerName) objMyFile.WriteLine (strLoginID) objMyFile.WriteLine (strPassword) objMyFile.WriteLine ("cd " & strFTPServerFolder1) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName1) objMyFile.WriteLine ("prompt") objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("cd /" ) objMyFile.WriteLine ("cd " & strFTPServerFolder2) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName2) objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("bye") objMyFile.Close Set objFSO = Nothing Set objMyFile = Nothing Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing Main = DTSTaskExecResult_Success End Function "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step |
#112
| |||
| |||
|
|
That's what I do. I create a ftpcommadn through the activex. Make sure sendftp.bat and the command file are in teh samae directory. But because you now use the Execute Process Task , you must delete these lines: Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing the ftp -s etc. is now inside the sendftp.bat the ftpcommandfile i'm referring to is your strFTPScriptFileName M. On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: I am writing something like this on my first ActiveX code... Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True) objMyFile.WriteLine ("open " & strFTPServerName) objMyFile.WriteLine (strLoginID) objMyFile.WriteLine (strPassword) objMyFile.WriteLine ("cd " & strFTPServerFolder1) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName1) objMyFile.WriteLine ("prompt") objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("cd /" ) objMyFile.WriteLine ("cd " & strFTPServerFolder2) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName2) objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("bye") objMyFile.Close Set objFSO = Nothing Set objMyFile = Nothing Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing Main = DTSTaskExecResult_Success End Function "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step |
#113
| |||
| |||
|
|
That's what I do. I create a ftpcommadn through the activex. Make sure sendftp.bat and the command file are in teh samae directory. But because you now use the Execute Process Task , you must delete these lines: Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing the ftp -s etc. is now inside the sendftp.bat the ftpcommandfile i'm referring to is your strFTPScriptFileName M. On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: I am writing something like this on my first ActiveX code... Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True) objMyFile.WriteLine ("open " & strFTPServerName) objMyFile.WriteLine (strLoginID) objMyFile.WriteLine (strPassword) objMyFile.WriteLine ("cd " & strFTPServerFolder1) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName1) objMyFile.WriteLine ("prompt") objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("cd /" ) objMyFile.WriteLine ("cd " & strFTPServerFolder2) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strLocalFolderName2) objMyFile.WriteLine ("mget *.*" ) 'objMyFile.WriteLine ("mdelete *.*" ) objMyFile.WriteLine ("bye") objMyFile.Close Set objFSO = Nothing Set objMyFile = Nothing Set objShell = CreateObject( "WScript.Shell" ) objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34)) Set objShell = Nothing Main = DTSTaskExecResult_Success End Function "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step |
![]() |
| Thread Tools | |
| Display Modes | |
| |