Posted: 2014-12-16 20:22
I am looking for some assistance in regards to getting some automated file deletions to occur via a program. To be more specific I am looking to do the following;
1) login to device
2) search for specific filenames older than "n" days;
3) delete files
As I am new to C# I am having some difficulty in understanding how to do this. I am able to successfully login to the appliance in question but I'm lost on how to proceed from here. Is there anyone here that could provide some help or provide some examples on how to do items (2) and (3) as aforementioned above? Thanks!
This code is working for login;
public static int Main()
// Setup session options
SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Sftp,
HostName = "hostname.host.com",
UserName = "user",
Password = "yEalB",
SshHostKeyFingerprint = "ssh-rsa 2048 a9:86:dc:0b:8f:e4:70:f1:dc:0d:26:3b:94:4f:52:41"
Location: Prague, Czechia
Iterate returned list of files and look for old files using
Posted: 2014-12-17 22:19
Thank you, this information is helpful. Hopefully I can get this working and share my code with the community. Thanks again!
You can post new topics in this forum
And it's free!