• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

How can i get ftp server time using vb.net code ?

How can i get ftp server time using vb.net code?
0
x1877
Asked:
x1877
  • 4
  • 3
2 Solutions
 
L00MCommented:
Is this a local ftp server? Or did you want to get the time off of a remote ftp server?
0
 
x1877Author Commented:
Hi L00M:

Thanks for your response. Its a remote ftp server.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
L00MCommented:
I don't believe there are any ftp commands to  retrieve the remote server time. I believe the work around would be to upload an empty text file. You coukld then DIR on that directory and parse out the file creation time. Or possibly download the file back to your computer and I think it will keep the server's creation time. Again you could parse out the creation time. I've never done this, so it will take some experimentation on your part. But I believe this should work.
0
 
x1877Author Commented:
You are right. I did it that way. Small difference, i created a folder insted and checked its creation time. I feel its an ugly way but cant help!!. There could be scinarios the ftp user does not have the permission to create or upload anything to the ftp server but can read. If you come acros anything else let me know. Again thanks for your response.
0
 
L00MCommented:
Yeah, if you will be dealing with multiple unknown servers, then there is no sure fire way I know of. If you need this only on a few known servers, and you have access to them, then you could create a web service or similar to return the time to you as needed. Then, your machine could ping those servers periodically and store the difference between your local time and the remote machine's time in a database. Then, with some basic math, you'd know the server time +/- a second or so.
I'll keep my eye open for more solutions.
0
 
L00MCommented:
Any paticular reason you gave me a B? EE Help states:

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

If you required more information, you should have asked. If you felt you deserved a refund, you could have (and still can) asked for that under community support. If you are unsure which grade to give, reference:
http://www.experts-exchange.com/help.jsp#hi73
0
 
x1877Author Commented:
Hi Loom,
How are you? Hope you are doing fine.

Infact i needed a solution which works always.

In this case i have to work with many unknown ftp servers. There is no way i can create a webservice or put an asp page on them.

This solution can still fail if the ftp user does not have a write permission to the ftp server.

So that is why i decided to award grade B for this answer.  Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now