SSIS Will NOT move or rename a file ?

  • I have searched for three days on this.

    Forgive my frustration.

    I recently migrated up to SQL Server 2005 from 2000 and am wishing I did not.

    I brought over a few old DTS ActiveX scripts and converted them from DTS to SSIS packages using the migration wizard.

    MOST of my ActiveX script work with no prob…but one of them fails no matter what I do.

    All I am trying to do is move ANY .csv file from one directory to another. That’s it.

    I don’t want to read the file, I don’t care about anything but moving ANY .csv file from one place to another.

    I have tried editing the script, I have tried the whole FOREACHLOOP crap and assigning variables the doing a file system task to rename or move the file but nothing.

    What is so Blasted hard about moving a .csv from point A to point B?

    Is SSIS that stupid? I cannot give it the most basic of DOS commands? Heck, I might as well make a scheduled job that fires off a DOS command and do it there since SSIS is too stupid or too literal to help me.

    Move *.csv from here to there. I must be missing how this SSIS is the best thing ever and will somehow make my life easier.

    So far, I have seen that I may as well have switched to Oracle. The only thing about MS SQL Server that I loved was that it had SOME level of intuition. Now that I see I must explicitly define and declare everything, I feel like I am writing in binary or something.

    Anyways, I am off my soap box and ready for any help I may get.

    Thanks in advance.

    P.S.

    Here is the Script;

    '**********************************************************************

    ' Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

    Set fso_obj = CreateObject("Scripting.FileSystemObject")

    fso_obj.MoveFile "D:\Folder\SubFolder\*.csv", "D:\Folder\OtherSubFolder"

    Set objFSO = Nothing

    Main = DTSTaskExecResult_Success

    End Function

  • This looks like fairly simple script. It would help if you can publish the exact error you get when you run the script. If you have other ActiveX scripts working already, what I would suggest is to find out if you have included all required permissions.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Ric...

    thx

    It was apparently a permission thing.

    Which is strange because a duplicate script writes the same file to a directory next to it but I can see that the security and rights are the same between the two folders.

    So I assume I have overlooked a rights setting somewhere.

    For now, I simply redirected the file to the folder it does play nice with and moved on.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply