Results 1 to 5 of 5

Thread: MoveFile on windows network drive

  1. #1
    Contributor
    Join Date
    Apr 2011
    Location
    Copenhagen
    Posts
    142

    Default MoveFile on windows network drive

    Hi Guys.

    I am having problems with the attached graph.
    Everything works fine until I want to move and rename a file.

    I have tried to several configurations for the filename, but I always I get the error that LAE cant find the file.
    Any suggestions?






    Templates.brg

    WARN: error moving file \\naspri02tsivz2.tcad.telia.se\TS-Team201\MS_FI_Settlement_ALL\Brain\Data 4.6\Temp\Tempfile.xlsx: The system cannot find the path specified.
    Line: 1; BrainScript: moveFile(B,NewFile)
    Operator: 'move-file'
    Error Code: brain.node.MoveFile_ExprOp.cpp.69

    ERROR: Node execution terminated while processing data by error:
    error moving file \\naspri02tsivz2.tcad.telia.se\TS-Team201\MS_FI_Settlement_ALL\Brain\Data 4.6\Temp\Tempfile.xlsx: The system cannot find the path specified.
    Error Code: lae.node.executionTerminated

  2. #2
    Contributor
    Join Date
    Apr 2011
    Location
    Copenhagen
    Posts
    142

    Default

    It seems like this forum is slowly dying..

    The strange thing is that I am renaming other files on the same network in other graphs, this is why I just cant figure out what is wrong with this one.

    Anyone?

  3. #3
    Lavastorm Employee
    Join Date
    Aug 2009
    Location
    Cologne
    Posts
    513

    Default

    Hi,

    I believe that the problem with moveFile is that when the LAE server is running on a non-windows platform it attempts to simply perform a rename operation instead of a move - which can run into issues on network drives.

    If this is the problem you are running into, you should be able to use a script equivalent to the following to do what you want (replacing "<new>" with the fully qualified filename for the new file you want to create, and "<original>" with the fully qualified file name of the file you want to move)

    Code:
    touchFile("<new>")
    appendFile("<original>", "<new>")
    deleteFile("<original>")

  4. #4
    Contributor
    Join Date
    Apr 2011
    Location
    Copenhagen
    Posts
    142

    Default

    Hi Tim.

    The server I am connected to is my local machine, which is a Windows 7 machine, so there are only Microsoft involved here.
    But anyway, the code is working!
    Thank you Tim :-)

  5. #5

    Default

    This forum is for LAE only and there is a new forum for Dataverse. The plan is to move this forum over to the new site in the next few months.

    Regards, Tim.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •