Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Copying a file from a URL to Datastore

$
0
0

I am trying to copy a list of files to a Datastore from a URL.
(I really would like to just copy it directly from the vCO server, but I am not sure that can be done)

 

String[] = new Array("file1", "file2", "file3");
VC:Datacenter Datacenter
VC:Datastore Datastore
tempFolderPath = "[SAN-LUN1] path"

 

 

 

var host = Datastore.sdkConnection;
var datastoreFileManager = host.fileManager;    for (var file in fileList){           var currVcoPath = "https://vcofiles.domain.net:8080/file/path/" + fileList[file];        var currDestName = tempFolderPath + "/" + fileList[file];           System.log("Copying " + currVcoPath + " to " + currDestName);               try{        datastoreFileManager.copyDatastoreFile_Task(currVcoPath,null,currDestName,Datacenter,true);  // FileManager        }catch(err){            System.error(err);        }    }

 

The error I get is generic. It just stays an error has occurred on line #12

Thank you in advance for your help.

 

~Alex Allen C.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>