I'm using the following code just to copy a file from a smaller filepath into a longer file path (> 260 characters).
string dbCDataPath = Path.Combine(DYRECTORY_WITH_GUARANTEE_ACCESS,Path.GetFileName(pathFileName));
string targetFile = Path.Combine(Path.GetDirectoryName(pathFileName), Path.GetFileName(pathFileName));
File.Copy(dbCDataPath, targetFile, true);
I'm getting Could not find a part of the path error and I don't know why I have double checked both the source and the destination folders, both exists. Any help will be highly appreciated.