Retrieves a list of files from the archive to the local computer
filenames = gd_retrievefiles(IDs, directory)
filenames = gd_retrievefiles(IDs, localpaths)
Warning: If a file exists with the same name on the local machine, it will be **overwritten** !!!
The ID needed to retrieve a file can be found in its metadata as standard.ID, and is also returned by gd_archive.
filenames = gd_retrievefiles(IDs, directory) retrieves a list of files from the archive given a cell array of file ID strings, and saves the files to a local directory specified by the directory string. The original name of the file will be used, which is determined by the standard.localName property in the file’s metadata. The function returns the retrieved files' new locations as a cell array of strings.
filenames = gd_retrievefiles(IDs, localpaths) retrieves a list of files from the archive given a cell array of file ID strings, and saves each file to a local file specified by the corresponding localpath string. The function returns the retrieved files' new locations as a cell array of strings.
Retrieve a list of files to a directory and use their original file names.
gd_retrievefiles ({fileID1, fileID2, fileID3},'C:\myDir')
ans =
'C:\myDir\input.dat'
'C:\myDir\output.dat'
'C:\myDir\config.txt'
Retrieve a list of files to the specified localpaths.
gd_retrievefiles ({fileID1, fileID2, fileID3},{'C:\myDir', 'E:\temp\myOutput.dat', 'E:\temp\myConfig.txt'})
ans =
'C:\myDir\input.dat'
'E:\temp\myOutput.dat'
'E:\temp\myConfig.txt'
You can only retrieve data that you archived or that someone else has given you permission to access.
A valid proxy certificate is required to retrieve a file, variable or metadata (see gd_createproxy from the Geodise Compute Toolbox).
You must have access to the host machine the files will be retrieved from. Your certificate subject must be added to the gridmap file on the host and to the authorisation database.
gd_retrieve, gd_archive, gd_archivefiles, gd_datagroup, gd_datagroupadd, gd_query, gd_createproxy
Copyright © 2007, The Geodise Project, University of Southampton