FileSystem.CopyFile to BIM360 via Desktop Conector

Hello all,

I am trying to copy a file from my local computer to BIM360 via the Desktop Connector. I am not sure if its a Dynamo issue or a Desktop Connector problem because sometimes it works and sometimes it does not. Has anyone else tried this and had continued success?

After the Run:

Folders in Desktop Connector are kind of elusive (to work with programmatically) because os modules see them only if you have manually opened them in browser (or when Revit tapped into them to link files). Anyway, I tested the following python script and it worked on all trials:

import os

import shutil

#source files
all_paths = []
for root, dirs, files in os.walk(r"C:\Users\ha1\Desktop\SourceFolder"):
    for file in files:
         all_paths.append(os.path.join(root, file))

# copy them to the destination 
for files in all_paths:
    shutil.copy(files,r'C:\Users\ha1\BIM 360\Project_Z\Folder_Y')


OUT = all_paths
1 Like

@habdirad,
Thanks for the reply. I am thinking it must be a BIM360 Issue. Your code worked but it only copied the backup and not the base fail. It also did not version the files like it uses to.

I will keep looking into it but I am guessing it has to do with something else. The file I am trying to copy used to be on BIM360 and then I deleted it. But now I cannot get it to go back on there.

I may try installing AutoCAD. I got a new computer recently that does not have it. My old computer did and I think it was working then but not sure.

After running the script twice:

I finally solved the problem and it was a dumb one on my end. I was pulling the name of a sheet for the name of the file. Someone on my team renamed all of the sheets. Names - Looked - Like - This and now Names-Look-Like-This.

New files were not uploaded because they were identical to the ones already on BIM360.

Anywho it was working the whole time.

Sorry for the post.