0
1

How do I use the Rebex API to set file properties on a remote file server.

asked 25 Aug '10, 18:41

Andy%20Blum's gravatar image

Andy Blum
16
accept rate: 0%


Use Sftp.SetAttributes method:

C#:

// create an Sftp instance and connect/authenticate
Sftp sftp = new Sftp();
sftp.Connect(serveName);
sftp.Login(userName, password);

// specify attributes
SftpAttributes attributes = new SftpAttributes();
attributes.Modified = DateTime.Now;
attributes.Permissions = SftpPermissions.OwnerWrite | SftpPermissions.OwnerRead;
...

// set attributes of a remote file
sftp.SetAttributes("file.txt", attributes);

If you prefer VB.NET, please let me know.

link

answered 26 Aug '10, 09:32

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.2k18
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×115

Asked: 25 Aug '10, 18:41

Seen: 363 times

Last updated: 24 Mar '11, 19:23