VMware Cloud Community
mjdadd
Contributor
Contributor

Move Datastore to Folder

Hi, I have created a workflow to move a datastore to a folder as follow:

Inputs:
datastore = VC:Datastore
folder = VC:DatastoreFolder

Script:
var array = new Array();
array.push(datastore);
task = folder.moveIntoFolder_Task(array);

This works with the select-able Inputs listed above but i would like to have those as variable inputs that match these

Inputs:
datastore = VC:Datastore = any datastore with a name like *_local_datastore
folder = VC:DatastoreFolder any folder with a name like * Local Datastores

what would be the best method of turning these into variables. The ultimate goal here is to move any datastore with a name containing _local_datastore and move them to a folder with the name containing Local Datastores

Thanks

Matt

 

 

 

 

 

Reply
0 Kudos
0 Replies