Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mitchel
Starting Member
11 Posts |
Posted - 2005-08-31 : 13:33:13
|
Hi,The following code works perfectly but now I want to do a little tweak at a different part of the DTS package. What I want to do is to delete files that are blank so they are not FTP'd to the remote server (a zero byte TXT file). I can see in my head what I need to do to the code, but I cannot figure it out. It seems like I would have to add some type of IF statement?This is the code that runs after the FTP part so the files do not get sent again:'**********************************************************************' Visual Basic ActiveX Script'************************************************************************Function Main()Dim objFSODim objFolderDim objFileSet objFSO = CreateObject("Scripting.FileSystemObject")Set objFolder = objFSO.GetFolder("C:\Websites\LocalUser\web-forms\aio\")For Each objFile In objFolder.FilesobjFile.Delete TrueNextSet objFile = NothingSet objFolder = NothingSet objFSO = NothingMain = DTSTaskExecResult_SuccessEnd FunctionAny help would be greatly appreciated.Thanks!Mitch |
|
|
|
|