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.
EPDM 2014 SP4
Appears by using the flag EdmGet_Simple instead of EdmGet_MakeReadOnly, the files get copied into place in the vault. The copied files are only <Local Files>, but its a start!
Retrieving data ...