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?
You can use the Rename-Item commandlet. It is also possible to rename a file when using the Copy-Item commandlet.
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
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:
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.