3 Replies Latest reply on Dec 14, 2013 12:38 PM by amith.madisetty

    FDM BefFileImport script got Error When replace file strFile

    968808

      Hi all,

       

      I have a problem when try to replace file name input in script BefFileImport, it show me permission denied in the logs.

      Can somebody teach me how to fix this error?

       

      the below is my script:

       

      Sub BefFileImport(strLoc, strCat, strPer, strFile)

      '------------------------------------------------------------------

      'Oracle Hyperion FDM EVENT Script:

      '

      'Created By: admin

      'Date Created: 2013-12-13 19:34:04

      '

      'Purpose:

      '

      '------------------------------------------------------------------

      Dim fso

      Dim f4

      Dim f5

      Dim Location

       

      If InStr(strFile,"test123")>0 Then

      Location="C:\Oracle\FDMApp\SampleApp\Inbox\Batches\OpenBatch\"

       

      Set fso = CreateObject("Scripting.FileSystemObject")

       

      If (fso.FileExists(Location & strFile)) Then

           Set f4 = fso.GetFile(Location & strFile)

                f4.Delete

           Set f4 =Nothing

      End If

       

      Set f5 = fso.GetFile(Location & strFile & "Backup.txt")

           f5.Name=strFile

      Set f5 = Nothing

       

      Set str=Nothing

      Set fso=Nothing

      End If

       

       

      End Sub

       

      ----------------------------

      The error was:

      ** Begin FDM Runtime Error Log Entry [2013-12-14 13:55:02] **

      -------------------------------------------------------------

      ERROR:

      Code............................................. 70

      Description...................................... Permission denied

      At Line: 55

      Procedure........................................ clsEventHandler.PobjAPI_BefFileImport

      Component........................................ upsWObjEventHandlerDM

      Version.......................................... 1112

      Thread........................................... 26212

       

       

      Need someone help

       

      Thanks
      Dedy