FTP Get Exactly Modify Time by file [SOLVED]

Hi guys,
Im working on a project!
I have a code here.
FtpWebRequest request_now = (FtpWebRequest)WebRequest.Create("ftp://IP");
request_now.Credentials = new NetworkCredential("user", "pass");
request_now.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
FtpWebResponse response_now = (FtpWebResponse)request_now.GetResponse();
Stream responseStream_now = response_now.GetResponseStream();
StreamReader reader_now = new StreamReader(responseStream_now);
while (reader_now.Peek() >= 0)
MessageBox.Show(reader_now.ReadLine());
That displays me all files, all rights and the modified date,
The problem is I just get the hour and minutes of the modified file.Windows show me the modified time in seconds too and these are important.
Is there any way to get the modified time with the seconds from a ftp file?
Thanks in advance,
EDIT:
Ah guys got it.
People with the same problem heres the code:
FtpWebRequest request1 = (FtpWebRequest)WebRequest.Create("ftp://8.8.8.8/test.file.txt");
request1.Credentials = new NetworkCredential("user", "pass");
string test = "";
request1.Method = WebRequestMethods.Ftp.GetDateTimestamp;
request1.Proxy = null;
using (FtpWebResponse resp1 = (FtpWebResponse)request1.GetResponse())
test = resp1.LastModified.ToString();
MessageBox.Show(test);

Hello Kevin,
Thank you for sharing the solution back to us, however it will be better if you can post the answer as a new post. In that way I can mark it and others can find the answer easily.
Anyway, I will copy your solution here in order to improve this post:
Questoin:
Is there any way to get the modified time with the seconds from a ftp file?
Kevin's solution:
FtpWebRequest request1 = (FtpWebRequest)WebRequest.Create("ftp://8.8.8.8/test.file.txt");
request1.Credentials = new NetworkCredential("user", "pass");
string test = "";
request1.Method = WebRequestMethods.Ftp.GetDateTimestamp;
request1.Proxy = null;
using (FtpWebResponse resp1 = (FtpWebResponse)request1.GetResponse())
test = resp1.LastModified.ToString();
MessageBox.Show(test);
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Setting the Author and Modified Time of Files and Folders via 2013 Rest

    Hi
    We've got an 3-legged-oAuth, `permissions on the fly` app that interacts with Sharepoint via the Rest AP. We're running into some hurdles preserving ownership and modification metadata on files migrated into the system. 
    With Sharepoint, the typical approach is to authorize a single admin user an use their credentials to upload every file arriving from the source. The problem: every file's author is now the admin user.
    Is there any way to change the Author of a file during the initial upload or afterwards? The docs here: http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_FileCheckOut suggest not.
    Some services, such as Box and Google Drive provide various delegated authorization capabilities to create files on someone else's behalf. Perhaps this is an option? We could, for example, multiplex a set of oAuth tokens but that would require potentially
    hundreds of users going through the rigamarole of the 3-legged oAuth flow.
    Is our only option a C# app to fill in these gaps?

    Hi,
    According to your post, my understanding is that you wanted to change the Author of the file.
    If you don’t want to use the C# option, we can use the JavaScript to retrieve the created by field then change it.
    There are two similar articles, you can have a look at them.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bba08ecc-297e-4b32-a8f4-bbc2a677d6bd/retrieve-created-by-list-item-field-using-javascript?forum=sharepointdevelopmentprevious
    http://www.c-sharpcorner.com/UploadFile/anavijai/get-created-by-and-modified-by-values-from-sharepoint-2010-l/
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Previous Time Capsule files

    I was using a Lacie external drive to backup with Time Machine.. just bought a Time Capsule and have removed the Lacie drive-- is there a way i can get the older Time MAchine files from the Lacie to the Time Capsule??.. there are about 3 months worth of backups on that Lacie-

    Not with Apple software that I know of.
    Personally, I would just start backing up using the new Time Capsule.
    I would also plug your Lacie into the Time Capsule via USB if capable and use the Lacie as another backup device in your network. Leave your old Time Machine files on the Lacie for now so they are available to you until you decide to erase them.
    Just a thought and my opinion.
       Joseph Kriz

  • How to get last modified date and time of a file which is in apache server.

    Hi ,
    I need to get last modified date and time of a file in remote machine.
    This file is in remote machine which has apache server installed.
    I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
    URI is got from apache server URL by using toURI method.
    when I use lastModified method , its throwing exception , because scheme of URI is not file.
    I can't give scheme as file because ftp server is not installed on that server
    Is there any other way to get this information .

    No, unless you can use an FTP client.

  • FTP Get File.vi not responding

    I'm trying to use the vi "FTP Get File.vi" (from the internet toolkit) to retrieve a specific file from an ftp site. Pn;y that for the moment. The FTP site is set up, and I checked and double checked that it was working fine (using filezilla) and that the stated directories and files are correctly spelled, etc.  When I run the attached vi I get a darkened a darkened arrow icon indicating the program is running, No errors are generated.  If I change ANYTHING on the remote path, such as an incorrect spelling of the name of the file I want to download, I do get an error and the program stops.  Evidently it knows the file is there, but something is not working.  I include in the attached  vi the information including the password for the remote ftp site to make it easier to test although you will probably have to creat a local directory to recieve the copies file at "C:\TELEMEDICINE" or else edit the local path however you want.  I will change the site pw, and perhaps the name after we get this figured out, but I figured it might make helping me easier for now.  Possibly I am misunderatnding soemthing about how this vi is suppse to be used, but I have read the help docimentation, and everything similar I could find onf the web. Possibly it is something stupid.
    Some other related information that may or may not help. 
    (0) I tried the FTP browser vi which is one of the example vis included with labview (do a search on "FTP" under examples),  It worked great - just like filezilla, so the toolkit is working.
    (1) The remote file is a .lvm data file, and is pretty small - 124kb.  So if the file transfer is working it should take a very short time (as it does using filzilla).
    (2) I did try letting the program run for many minutes on the outside chance something was very slow, but the local file never appeared anywhere, and the program was just frozen in RUN mode, but no errors ever so long as I have the remore path correct, as I stated above.
    (3) I checked and made sure the security permissions were set (I'm only using windows firewall and security on the local computer).  Labview had full permissions.
    (4) I'm using labview 2009, but I got all the  update disks.  Not sure if I bothered to go through the full update on this computer (I thought I did but it still says 2009),  Probavly doesn';tmatter either way.
    Attachments:
    CLIENT2.vi ‏10 KB

    I do specify the whole file path complete with name of the file and it extension
    (see original post attachment). Is that what you are referring to?
    I suppose I should update with some more recent information here to save people some
    time. The problem is NOT solved at all, so I would still appreciate any info
    that may help. However we now know that the program works exactly the same,
    apparently, for me (on a VISTA machine and a Windows 7 machine) and for Frank
    from tech support.  The program works sometimes, and then inexplicably
    stops working. The timings of these failure don't appear to be connected to
    anything we did - things stop working for a good while, but after doing nothing. For example while the computer is sleeping.  I haven’t determined if  the “freeze ups” happen on on different computers all at
    the same time. I’m working on that one.
    So, the conclusion is that it must (used advisedly) be something related to
    the only common factors – either the ftp server on my web provider, or that the
    vis in question are not quite right and this only shows up now and then for
    some reason.   I believe that I set everything up correctly on the
    ftp site I haven’t changed anything lately, and have used numerous FTP
    browsers, such as Filezilla with that site for a very long time (years) 
    with no issues ever. It is hard to think of a locus for the source of the
    problem other than one of those two.
    I'm planning to call the company serving my ftp site at some point, but what
    am I going to ask them other than if my ftp site is configured correctly? It
    says it is. It has always worked. It works using the labview example browser
    (which uses different vis), even when the "FTP Get file.vi" and FTP
    Get Buffer.vi" do not work at the same moment.

  • How do I move files from my iMac to my Airport without getting 'AirPort can not be modified' message. File sharing is enabled and I'm not getting asked for a password. Thanks

    How do I move files from my iMac to my Airport without getting 'AirPort can not be modified' message. File sharing is enabled and I'm not getting asked for a password. Thanks

    What OS are you running.. this is usually only a problem in Mavericks.
    If so I recommend you mount the hard disk manually..
    Use Go, Connect to server.
    Type in the IP address if static.. eg
    AFP://10.0.1.1
    Or the name.. but you will have issues unless the name is short, no spaces and pure alphanumeric.. if you are using bad names.. fix it by a full factory reset in airport utility and give it all names that comply to the above.
    Type in
    AFP://TCname.local Where TCname is replaced with the actual name.
    You will be asked for the password the first time which is public unless you changed it.. please remember to save this in the keychain.
    Copy files then to a new directory you create on the TC.. do not place files inside the TM sparsebundle. Nor directly under the main directory.

  • FTP Get File List Action Block, It's double listing files!  ver 11.5

    Hi guys.. I have a good one!   I have an FTP Get File List action block in my BLS transaction.  Occasionally, it double lists the files in its output.   For testing I put a repeater with a logevent output where I log the filename, date, and size.  Heres what I saw for my action block output.
    2009-02-13 00:38:00,963  [UserEvent] : File Name: DMM_Export_0010056.txt, File Date 2009-02-13T00:36:00, File Size 339
    2009-02-13 00:38:00,963  [UserEvent] : File Name: DMM_Export_0010056.txt, File Date 2009-02-13T00:36:00, File Size 339
    This is xMII  version 11.5.6 b73  with java 1.4.2_07
    I have a workaround by putting in a distinct action block, after the filelist, but anybody have an idea why this might happen?   My theory is that something might be occuring if the file is being written to while we try to process it, but not sure. 
    I've been building BLS parsers since 2003, (Remember those fun times with Jeremy?)   I've never seen this happen.

    My example is a sample log file before the distinct action.  The general log shows nothing other than the subsequent transaction errors I get as a result of running the same error twice (Tcode return from BAPI calls etc)
    Here is something else interesting..  my userlog file is acting funny, like its trying to write on top of itself.  could it be the transaction is actually running twice or parts of it? 
    For example look at the following log entries
    This is how my log file entry for a production confirmation should look
    2009-02-13 00:38:06,854 [LHScheduler-Int10_NestingWOProdConf] INFO   UserLog - [UserEvent] :
    However sometimes... its looking like this...
    2009-02-13 2009-02-13 00:38:11,854 [LHScheduler-Int10_NestingWOProdConf] INFO   UserLog - [UserEvent] :
    Like it started writing to the log, then started again.
    The problem we are having is that we have JCO calls to SAP in this transaction that does goods movement, we get locking / block errors back from our  saying that we (our sap account) is already updating the information.   Sometimes the information would be posted twice!  You can see how this has become a HUGE issue posting data to a LIVE system twice.
    This is happening on 2 xMII servers.

  • How to get exact date and time difference?

    Hi,
    When i am using the below sql statement:
    SELECT (TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') - to_Date('7/27/2006 8:30:13 AM','MM/DD/YYYY HH:MI:SS AM')) * 24 hours FROM DUAL;
    the output is:
    Hours
    8.50055555555556
    But Actually it is 8.30
    So how can i get exact days and time difference between two dates in Oracle?
    Thanks....
    Regards,
    Suman Sakinala
    Edited by: SSN on Sep 19, 2008 1:27 AM

    Or more clearly (this time I have my date_from and date_to the right way around hehe!)
    SQL> ed
    Wrote file afiedt.buf
      1  WITH t as (select TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') as dt_to,
      2                    TO_DATE('7/27/2006 08:30:13 AM','MM/DD/YYYY HH:MI:SS AM') as dt_from FROM DUAL)
      3      ,d as (select (dt_to-dt_from)*24 as diff_hrs from t)
      4  -- end of dates
      5  SELECT TRUNC(diff_hrs) as hours
      6        ,TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60) as mins
      7        ,TRUNC(((((diff_hrs) - TRUNC(diff_hrs))*60) - TRUNC(((diff_hrs) - TRUNC(diff_hrs))*60))*60) as secs
      8* FROM d
    SQL> /
         HOURS       MINS       SECS
             8         30          2
    SQL>

  • FTP Time Capsule Files

    I have a MAC running OX X 10.5.6 and I am trying to access my Apple Time Capsule files remotely. I have port 21 open and have assigned it to my local Time Capsule address of 10.0.1.1 I am not sure why but I get the message "unable to connect to <IP address FTP server dropped the connection.
    My windows script is:
    Fetch 5.3 (5D161) Intel running on Mac OS X 10.5.6 (9G55) Intel English
    StuffIt Engine 0x820, StuffIt SDK Version 10.1.1b1
    Partial serial FETCH5X001-TGFE-PGCK T
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:35:21 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:35:21 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:35:33 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:35:33 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:36:55 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:36:55 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:37:11 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:37:11 PM)
    Update check skipped at 02/09/2009 10:37 PM (next check after 02/15/2009 07:20 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:37:43 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:37:43 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:37:49 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:37:49 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:38:33 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:38:33 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:39:10 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:39:10 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:44:43 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:44:43 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:44:48 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:44:48 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:48:19 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:48:19 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 10:48:37 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 10:48:37 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 11:01:13 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 11:01:13 PM)
    Connecting to 51.67.187.169 port 21 (Mac OS X firewall is allowing connections) (2/9/09 11:07:24 PM)
    Connected to 51.67.187.169 port 21 (2/9/09 11:07:24 PM)

    Buggy TC. You just need to restart it.
    Let me know how you get on.

  • Algorithm or pseudo code sought for getting the latest last modified time..

    Hi I need to write a program in java that lists the latest last modified time among the files in folders and its subfolder and also gets the size of the folder. In my case, average folder size is 9 GB. Could you please suggest any algorithm to achieve this?? I tried to implement it by gathering last modified times from folders and its subfolders recursively and storing the info in Vector and finally
    getting the max of the last modified times but it was horribly slow and memory hogging.

    Remove the part that stores the data in a Vector. You don't need to store any data to add up a series of numbers. And you don't need to store any data to find the largest of a series of numbers either. Just scan the directory recursively as you are already doing and keep track of the sum of the sizes and the max of the last-modified dates.

  • File modified time

    Hi,
    how can i make subversive use file commit time as the last modified time of the file on my disk? It seems these times differ from svn-log shown times.
    For instance with Tortoise svn client, you have a setting similar to this:
    .subversion/config
    [miscellany]
    use-commit-times = yes
    BR,
    igor

    Hello!
    As far as I know, this:
    .subversion/config
    [miscellany]
    use-commit-times = yes
    is a Subversion option. So, it should work for both JavaHL and SVN Kit the same way if set. And since I additionally did check the SVN Kit code, I can assure you that it handles the option.
    So, everything should work just fine. If there is a problem with the option, please tell what exactly it is, since the option itself does not seem to require any special handling on the Subversive plug-in's part.

  • I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of A

    I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of Adobe InDesign CC (10.1). You must use that version or later to open the file." AARRGGHH! So how do I access the file?

    Sounds like you opened and saved it in CC, so now you need to go back to CC and either complete the project there, or export to IDML to take it back into CS6.

  • How to get the last time a record was modified or created ?

    Is there a way (hidden system fields for example, system view, other ?) to get the last time a record of a table was modified or the date it was created.
    Thanks for any help.
    Stiphane CAMPION

    blarman74 wrote:
    I know I could do this with a trigger, but I was wondering if there is a data dictionary view I can query to find the date/time a table was last updated. What I have is a table that is constantly getting hammered with new data being uploaded from a third party. We need to keep close tabs to verify that this datafeed is constantly running and bringing in new data. Because the data that comes in comes from multiple timezones and there are hundreds of lines, our attempts at monitoring by just looking at the data leave something to be desired.
    Any ideas?refer this links
    How to find Last modified/updated time of a particular table
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1590655700346557237
    Thanks

  • My mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    my mac will not copy more than one file at a time and gets locked up if the file is too large, my mac will not copy more than one file at a time and gets locked up if the file is too large

    So now that you have repeated the same thing three times that doesn't make things any clearer at all.
    You are copying files from where to where?
    How are you attempting to copy files, software or click and drag?
    Any other detail would be helpful.
    Allan

  • I keep getting the error "zotero could not be installed because firefox cannot modify the needed file". Any suggestions on how to fix this?

    After downloading Zotero (a plug in that is in theory custom-designed for firefox), I get an error message that says "zotero could not be installed because firefox could not modify the needed file". That's all the detail I have.

    You get this error if you install an extension that needs to be unpacked in order to work properly, but this isn't happening. The default is to copy the file to the extensions folder and rename the file part to the ID of the extension.
    *https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking
    You can try to set the extensions.alwaysUnpack pref(s) on the <b>about:config</b> page to true.
    It is possible that there is a problem with the file(s) that store the extensions registry.
    Delete the extensions.* files (e.g. extensions.sqlite, extensions.ini) and compatibility.ini in the Firefox profile folder to reset the extensions registry.
    *https://support.mozilla.org/kb/Profiles
    New files will be created when required.
    See "Corrupt extension files":
    *http://kb.mozillazine.org/Unable_to_install_themes_or_extensions
    *https://support.mozilla.org/kb/Unable+to+install+add-ons
    If you see disabled or not compatible extensions in "Firefox/Tools > Add-ons > Extensions" then click the Tools button at the left end side of the Search Bar to check if there is a compatibility update available.
    If this hasn't helped then also delete the addons.sqlite file if present.

Maybe you are looking for