File Modified date

Hi, I have a question about getting file name. When I use list method (import java.io.file) I can get all the files names under the directory I give. I am just wondering if I can get each file's modified date. If yes, how?
Thanks in advance!

use listFiles. you will get an array of File objects.
for modified time use lastModified().

Similar Messages

  • File Modified Date Wrong

    Hi Everyone,
    Happy New Year! I have a question. I have a 2012 MacBook Pro running 10.10.1 connected to a Seagate GoFlex Home NAS. This is the main storage location for all my files (work and personal). I am having a very annoying problem, all my file modified dates are showing September 2029! When I access the same file in my Windows 7 VM the date is correct. The date and time are set correctly in OS X and on the NAS drive. Any ideas?

    Hi Allan,
    The issue was caused by the date on the NAS being set to automatic. I manually set the correct time, and all was ok after!
    Hope this works for you!
    Mark

  • Smbfs file modified date not updating

    When I save a file from Photoshop CS3 to an SMB share (where I have terabytes of images) it appears the Modified Date does not change after I edit. This makes it impossible to work my downstream processes which rely on looking for modified image since a certain date.
    I checked against TextEdit (seems to rewrite the file which gets a new create and modified date) and TextMate where the modified date is correctly set. Also the unix touch command works fine.
    Any ideas how to ensure that a file saved from Photoshop CS3 will correctly set the Modified Date on an SMB share?

    Usually the changes are made to the contents of the domain.sites2 folder and not the actual folder itself. As long as you edit, save and publish, the next time you open iWeb you'll see the latest version. However, be sure to backup the Domain.sites2 package frequently.
    OT

  • Itunes file modified date/time

    Ok, so I know for sure this is related to me travelling to Florida and back, and changing the timezone on my system (Windows 7).  So I started with all of the music in my itunes at MST, went to and changed to EST, then came back MST.  This is when the problem occurred:
    On a playlist, if I sort by date modified, I'll see one date (Say its Sep 1 2011, 10:00 am).  If I double click the file it will appear as if it moved randomly, BUT the modified timestamp now says Sept 1 2011, 8:00 am.  What in the world is this behavior?  I don't much feel like double clicking every song to fix this... do I need to completely remove and readd all songs to fix?  And why did it happen in the first place; am I going to need to do this every time I change time zones?

    itunes 7.6.2
    I had the same annoying problem: iTunes would hesitate at the beginning of a song and then resume playing it. This affected ALL tracks in my 17,000+ library. No quarter.
    My fix was to uncheck crossfade playback in preferences. I have never used sound check nor sound enhancer so those boxes remained unchecked.
    Worked for me and ALL tracks play now with no stutter.
    Hope this helps some.

  • Is Bridge supposed to sort raw files by date modified?  Not on my systems.

    I have just installed photoshop/bridge cs5 on two windows 7 systems, home premium 64 bit, one an i3 chip and the other an i7 chip.  I was formerly using cs3.
    I see that Bridge is not sorting my raw files by date modified like it did before.  It sorts jpg files okay.  I noticed that the xmp files associated with the raw files, when I hover over them in Windows Explorer show the correct modified date but the thumbnail icon shows only creation date, which I assume is as it shou ld be.  Why doesn't Bridge CS5 sort raw files by date modified as it did in CS3?  CS3 must have referred to the xmp file modified date to use for sorting, I would think.
    I should also mention that the metadata file does not show the correct date modified, but gives the same date as the creation date.  Also the thumbnails for raw images that have been modified correctly show the icon that indicates it was modified.
    Also, I see that when you hover over a thumbnail in Bridge CS5 nothing is revealed about the file.  In CS3 Bridge hovering over a thumbnail showed several pieces of data about the file including anything in the file info.
    Is this just how Bridge CS5 works or have I missed a setting somewhere in Bridge or Windows?

    Curt, thanks for your response.  The tool tips
    was not checked and did result in "hovering"
    working.  I'm not sure why that's called tool tips, but okay.
    I have just installed the software in the last
    few days.  I almost immediately got an update
    notice and installed the update.  I thought I was
    up to date.  Then, just a while ago I got another
    update notice.  After installing it the sorting
    now works.  Thanks much.  Problems seem to be solved.

  • Using client_text_io.get_line to get file created date...

    client_text_io.get_line is getting file modified date, is there any way to get the file created date instead?
    Thanks,
    Jess

    Ha-ha, you're r't, thanks for clearing my head, don't know what I'm thinking. The thing I'm looking for should be dos cmd dir to get the file created date instead of modified date.
    Thanks again
    Jess

  • Avoiding Lightroom to change the file's date of JPEG

    When I import my directories with JPEG pictures, the file modified dates are changed of my JPEG pics. Is it possible to avoid this? I prefer to keep these dates.
    Of course the capture date is also stored in the EXIF information, but still I prefer to see the date of the picture by looking at the file date.

    I use Windows XP. I have a combination of many old JPG's and new RAW pictures. Both are on my harddisk. When I import these into the LR database, the XMP files of the RAW files are updated (which is okay), but also the JPGs are updated and they loose their original file date.
    It is true that automatically update XMP data has been turned on. Maybe I should switch this off?

  • Use client_text_io.get_line to get file created date...

    client_text_io.get_line is getting file modified date, is there any way to get the file created date instead?
    thanks,
    Jess

    This is a Forms webutil question. You would be better off asking this question in the Forms proper, not least becaus emembers of the Forms team who actually worked on webutil (Duncan Mills, Frank Nimphius) often answer questions there.
    Cheers, APC

  • How can I preserve the modify date of the files I transfer from my local computer to the remote webserver?

    How can I make sure the the modify date of files are not updated to the date the file was uploaded or downloaded.
    There are multiple people working on my sites and I am the only one that uses Dreamweaver.  The problem this presents is when  one of my colleagues works on an image and I want to update my local computer it changes the date of the image to the date that I downloaded it and now when I compare what I have on my local computer to what is on the server they are different modify dates.

    Dont think you can find out the date of purchase!
    Where should know this without a payment bills or sales checks.
    What you can do is to find out when the notebook was registered on the Toshiba page.
    [Toshiba Warranty Lookup |http://computers2.toshiba.co.uk/toshiba/formsv3.nsf/WarrantyEntitlementLookup?OpenForm]

  • Occasional invalid modified date on a file - looks like a bug

    In the Bridge script I'm working on, I need to compare the last modified dates of files. I've found that when I iterate through the app.document.visibleThumbnails array that in nearly every directory I test on, there are one or two files that return an "undefined" value for app.document.visibleThumbnail[i].spec.modified. It is not the same two files each run, but it's always at least one that has a missing value. It's a pretty simple test app to illustrate the problem:
    var thumbs = app.document.visibleThumbnails;
    for (var j in thumbs)
    var modDateSpec = thumbs[j].spec.modified;
    if (modDateSpec == undefined)
    Window.alert("modification date is undefined");
    Unless this value is not intended to be reliable, this appears to be a bug which is why I am reporting it. I have worked around the problem for now by getting the fsName from the same thumbnail, creating a new File object with that fsName and getting the modified date from that temp object.
    I've verified that purging and rebuilding the cache does not make the problem go away. I see this problem on many different directories.
    Is this the right place to report this type of bug or is there a different procedure I should follow?
    --John

    pessex wrote: Anybody know?  Or know of a different way that I COULD do it in Terminal?
    Don't know about Terminal, but, because you are using 10.9.x and iMovie, try the iMovie method:

  • Looking for a third party utility to replace a file's "modified Date" field

    For video files, apparently the organizer displays the thumbnails with the date taken from the file's "modified date" field. For some wierd reason (which I'm discussing with Adobe CS) the organizer changed the date of all my videos in the "modified date" field, so now the chronology of all my video clips in the organizer went down the drain.
    Is there a third party utility to replace the "modified date" field of a file with the original shot date? (which in W7 is shown in the "Date" field).
    In other words: for every video file in my library, I want to take the date from the "Date" field and put it in the "Modified Date" field
    Thanks for your help.

    OK thanks.
    I've found a utility that modifes several of the date fields.
    Now, I just want to be sure that I don't screw this up...
    Which of the several date fields of a file holds the actual shot date?
    Which of the date fields is used by the organizer to "organize" the video files (avi and mov's) chronologically?
    Thanks for your help

  • 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.

  • How to accessed,created and modified date of particular file in java

    Hi,
    I am facing one problem.
    I know how to get the modified date/time of file in java.
    but i don't know how to find created and accessed date/time of file in java.
    Thanks,
    Tejas

    I guess thats not possible in in Windows.
    But if u r trying it on a unix machine.
    You can use Runtime class to call exec on the command
    ls -l filename
    and then store the result in a file . And then take out the last modified time. But you cant get created time.
    Thats a clumpsy way i believe.

  • Photoshop CC on Windows 7 is saving the file "date" as the created date not the modified date

    I have been using a much older version of PS (CS2) and just decided to update to PS CC. I have installed the trial version of PS CC and will begin the CC subscription as soon as the trial expires.
    I have noticed that PS CC saves the (main) date of the files as the "created date" not the "modified date" as it pertains to Windows Explorer and the Windows OS.
    Here is what is happening: I have a file that I created in 2007 that I use for a template. It is sized to specific dimensions, etc. and when I do my save as, it automatically saves into the desired file folder, so that's why I use this as a template. I setup a new photo and then drag and drop it into my template, flatten the image and save as. When doing this with PS CS2, the date for the newly saved file was assigned as the modified date (current date and time). So, when I searched for the file in Windows Explorer or when I went to open the file, the date shown for the file was the modified date. NOW, with PS CC when I perform the exact same process and do a save as, the file date shown in Windows Explorer and/or when I go to open the file is showing as the created date (3/9/2007), the date that I created and saved the template I use. This is aggravating to me because now when I want to open a file and sort by date, the date shown in Windows Explorer is not accurate. As far as I can tell, this only happens in PS CC. When I open an old file with ID CC and do a save as, it applies the current date, not the created date. And, when I was using PS CS2, whenever I did a save as the current date was applied as well.
    In summary, when performing a save as, the created date is being applied as the main date instead of the modified date. The question is: Is there a way to change this so that the modified date can be applied as the main date for the file when performing a save as?

    Below are two files created the exact same way on the exact same computer: the top one was saved in PS CS2 and the bottom one was saved in PS CC. Both were saved using the "Save As" command. You will notice that when the "Save As" command was used in CS2 it updated the "Created:" date, however, in the CC version the "Created:" date was not updated, only the "Modified:" date was updated. Is there a way to update the "Created:" date when performing a "Save As" in PS CC?

  • Storing the last modified date for files in a HashMap

    This method gets a list of all the .java files in the source subdirectory, gets the last modified date for them and stores the file name and last modified date in a HashMap.
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              ArrayList javaFiles = new ArrayList();
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.size(); i++)
                   currentFile=(File)javaFiles.get(i);
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;
    }The problems I am getting are:
    >
    The method listFiles(FilenameFilter) is undefined for the type myClass
    and
    >
    The method put(Object, Object) in the type HashMap is not applicable for the arguments (File, long)
    can anyone help? What's the best way to go aobut this?

    Thanks for the replies abenstex I modified it so that javaFiles is now a File[] and made the change you suggested but I still have the second problem, here's the code so far:
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              File[] javaFiles = {};
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=sourceDir.listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.length; i++)
                   currentFile=(File)javaFiles;
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;

Maybe you are looking for