1

In Cache Object Script how can I make a remote directory on an FTP Server. I do see the class MakeDirectory but that is returning 0 when I call it?

set ftp=##class(%Net.FtpSession).%New()
d ftp.Connect(COMServer,c.Username,c.Password)
d ftp.SetDirectory("/Test")
w ftp.MakeDirectory("6666")
0
Jefferson
  • 173
  • 2
  • 12
  • 32

1 Answers1

1

This should create directory 6666 under /Test, are you sure /Test exists and you have enough privileges to create directory there?

You can check ftp.ReturnCode and ftp.ReturnMessage to check for server response.

SSH
  • 2,533
  • 16
  • 21
  • Looks like it was after I created the folder like to move into the folder 'd ftp.SetDirectory("/Test")''w ftp.MakeDirectory("6666")' 'd ftp.SetDirectory("/6666")' – Jefferson Dec 07 '17 at 20:55