dir

Current Bloomberg Data License connection folder listing

Description

example

list = dir(c) returns the contents of the current working folder using the Bloomberg® Data License connection c.

Examples

collapse all

Create the Bloomberg Data License connection c. This code assumes the following:

  • The Bloomberg Data License SFTP server login name is 'xxxxx'.

  • The Bloomberg Data License SFTP server password is 'xxxxxxxx'.

  • The Bloomberg Data License SFTP server name is 'dlsftp.bloomberg.com'.

  • The Bloomberg Data License SFTP port number is 30206.

  • The decryption code is 'nAcLeZ'.

username = 'xxxxx';
password = 'xxxxxxxx';
hostname = 'dlsftp.bloomberg.com';
portnumber = 30206;
decrypt = 'nAcLeZ';

c = bdl(username,password,hostname,portnumber,decrypt);

Request the contents list of the current working folder using c.

list = dir(c)
list = 
       
  'd--x--x--x    2 root     root         4096 Sep  5 11:25 bin'
  'dr--r--r--    2 root     root         4096 Sep  5 11:25 etc'
  'drwxrwxrwx    2 op       general     61440 Sep 24 02:11 notices'
  ...

list contains a cell array of character vectors. Each character vector is one folder or file name.

Close the Bloomberg Data License connection.

close(c)

Input Arguments

collapse all

Bloomberg Data License connection, specified as a connection object created using bdl.

Output Arguments

collapse all

Current working folder contents, returned as an n-by-1 cell array of character vectors. n is the number of files or folders within the current working folder. Each character vector contains folder listing information for a folder or file name.

Tips

For details about Bloomberg Data License, see the relevant guides by entering DLSD and clicking <GO> in the Bloomberg terminal.

Introduced in R2015a