Start a new topic

Data Standard - Copy Folder With File Rename

Hey guys!


We have predefined project surveys and would like to create new projects using the datastandard.
Each project has a single new file in the new project folder.
This should get the same file name as the new folder.

Then the file should be automatically checked out and opened.


The instructions under this link works so far but I can not cope with the additional copy of the template file, renaming and checking out.


Can you please give me some food for thought?


Thanks a lot!

1 Comment

Hi Ramon,


Sorry for the late reply, I didn't see your post. In general you can also post questions related to Vault Data Standard in the Vault Customization Forum. We are also active there.

Regarding your question:

All the tasks you want to perform can be done with the Vault API but a few things are quite hard to implement. For example: copying a file to a different folder requires you to checkout the original file and then adding the local copy -that gets created when you check it out- to the new folder (at least that's the only way I know of). In this step you could also rename the local copy (before you check it in) to the desired new file name so you don't have to change that later. To check the file out again, you can use the same API call you would use to check the original file out. I'd recommend to use the VDF to check- in and out files. It is easier and cleaner. 

For the copying of the file you could even use powerVault and its Save-VaultFile as well as the Add-VaultFile commandlet instead of the Vault API but you would still need to perform the final checkout with the API because you cannot perform a checkout with powerVault commandlets. Let me know if I can somehow help you further with this 


Viktor

Login or Signup to post a comment