Skip to content

MakeDir

Creates a new directory on a remote environment.

1
myDocumentFiles.MakeDir(options: FileTransferOptions):void

Parameters

FileTransferOptions options
    Options for the remote directory.

Remarks

Creates a folder using the RemotePath property of the FileTransferOptions.

Examples

Create a directory for the batch and upload a file into it

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var folder = 'exports/' + $Xml.Evaluate('BatchNumber');

$Files.MakeDir({
    RemoteHost : 'sftp.example.com',
    RemotePath : folder,
    Protocol : 'SFTP',
    UserName : 'transfer',
    Password : 'secret'
});

$Files.Upload($Xml.Evaluate('ExportFile'), {
    RemoteHost : 'sftp.example.com',
    RemotePath : folder + '/export.csv',
    Protocol : 'SFTP',
    UserName : 'transfer',
    Password : 'secret'
});

See Also