Is it possible to 'close' a file (preferably through a workflow/script)?
I have a python action to move a file from the local library to the dropbox library. It uses
editor.set_file_contents()to create the copy in Dropbox, and then
os.remove()to delete the local file, followed by
editor.reload_files()to update the library.
Everything seems to work (ie the file is moved as expected), but a file with that name/contents is open in the editor. If anything changes with this file, it's written back to its original location as a new copy. Is there any way to clear the editor contents or close the file?
The only workaround I can think of is to have a scratch file that I open after the above steps to discard the current contents, but I was wondering if there was something cleaner.
You can use an Open URL action and the Editorial URL scheme to open the new version of the file:
Thanks - I was going to do something like that initially, but after moving the file, I wanted to be 'done' with that file if it make any sense?
Right now, I'm going to try and write up something that just opens the next file in the directory, and if there are no more files, then just an empty file.