1 Reply Latest reply on Jul 22, 2015 1:03 PM by Greg Thomson

    GetFileCopy() Problems...

    Greg Thomson

      I just can't seem to get IEdmFile5.GetFileCopy() to work for the life of me.  I was wondering if someone might have some suggestions as to what I'm doing wrong.

       

      Seems to copy fine for paths outside the vault, but for none inside the vault.  Is this not allowed?  Quirky?

       

       

       

                          string srcFilepath = "C:\\EPDM\\2028489.dxf";
                          IEdmFolder5 srcFolder = default(IEdmFolder5);
                          IEdmFile5 srcFile = vault7.GetFileFromPath(srcFilepath, out srcFolder);

       

                          // Copy with path

                          object objDestPath = "C:\\EPDM\\Manufacturing\\BEPL\\DXFs\\202\\";
                          object revisionName = "";
                          srcFile.GetFileCopy(0, ref revisionName, ref objDestPath, (int) EdmGetFlag.EdmGet_MakeReadOnly, "HelloWorld.dxf");

       

                          // Copy by folder ID

                          IEdmFolder5 dstFolder = vault7.GetFolderFromPath((string) objDestPath);
                          objDestPath = dstFolder.ID;
                          srcFile.GetFileCopy(0, ref revisionName, ref objDestPath, (int)EdmGetFlag.EdmGet_MakeReadOnly, "HelloWorld.dxf");

       

      -when path is outside vault (C:\EPDM), code seems to copy.

      -running with admin privileges, so can't believe I can't execute/see results.

      -Attempted paths terminated with and without "\".

      -GetFileCopy() executes without an exception, so no obvious HRESULTS coming to the surface.

       

      Any clues?

       

      Greg,

      EPDM 2014 SP4