Start a new topic

renaming a file using powershell

I am attempting to create a powerjobs script that renames a file based on a property

in otherwords  file name  chair.ipt  with the property of JobNo=17b1234  be renamed to  17b1234_chair.ipt


is there a commandlet that I can use to do that with?


Kim Hendrix


Hi Kim, do you want to rename files on the disk or Vault? In case of disk, then the links shared by Thomas are the right approach. In case of renaming the Vault file, we don't have a command-let (yet) that makes it simple, so, you'll have to go through the Vault API. The simplest approach would be to use vapiTrace and spy how Vault is doing it. I gave a quick look and the relevant operations are

- CheckOutFile

- DownloadFilePart

- UploadFiePart

- CheckInUploadedFile

There is more complexity related to it, so in case you need a working code sample, then we will need more time for creating it. 


I've also found these links:

https://forums.autodesk.com/t5/vault-customization/vault-api-how-to-rename-a-file/td-p/5720508

https://stackoverflow.com/questions/31390845/autodesk-vault-api-renaming-files


hope this helps

Hi Kim, as the question about renaming came up again, we made a short code snipped that shows how this might work: http://support.coolorange.com/support/discussions/topics/22000008250


hope this helps.

Login or Signup to post a comment