Getting File Creation Time

I am using web services call to return a database listing of some files that I have in a UNIX file system. The call to web services will give me the subdirectory and file that is maintained in the file system.
For example, my directory: is "/edyts/sblists"
And the listing under the directory contains the subdirectories:
/d08r
/d09r
/d10r
And finally inside of the subdirectories are files:
/d08r/sample.txt (<--this is what my web services call result looks like)
/d09r/sample2.txt
/d10r/sample3.txt
What I want to achieve is: After I make get my list back from my web services call, I want to get the date that the file or directory was created, and then check to see if it is older than 48 hours. What is the best way that I can achieve this?

I love it when people do something which returns information about X and Y, and they want to know what kind of magic someone can perform to get information about Z as well (given only X and Y, and Z is not something which can be calculated from X or Y).

Similar Messages

  • Can Spotlight search for file creation time ?

    Hi,
    Is it possible to use Spotlight to find files with a specific creation date and creation time ?
    Example:
    creation date: exactly 03/03/2008
    creation time: after 10:00 and before 12:00

    Hi Kees, not that I'm aware of, and since you can't run Classic and "Find File", I'd get EasyFind, Spotlight won't be reliable...
    http://www.devon-technologies.com/download/
    Near the bottom of the page.
    you can at least sort by date/time then to narrow it.

  • Can you get file creation dates for Nomad II .NVF fil

    Hi,
    I have an old Nomad II MG that has several voice recordings of my daughter over the last 4 years, but I don't know the dates they were recorded.
    Is there a way to get the actual date of the recording from the Nomad device? All I seem to end up with is the current date when I upload it into Windows.
    Thanks...
    lj

    Hi,
    Newbie to SharePoint, learn quite a lot from the links you provided.
    “I found out that the original dates are only available in SharePoint if the explorerview has been used”, this would make sense because the original creation time is generated
    by the file system in the local machine.
    However, when a file is uploaded to SharePoint library, it will be stored as binary data in the database, as well as the newly created time. It means that it will be a “new” file
    in the SharePoint site regardless of where it comes from.
    Per my knowledge, the only way I can suggest is that you will need to create a client desktop application for the file uploading, which will be a more general way not only for
    uploading a file, but also when we need to migrate files between different systems.
    Thanks

  • How to get PO Creation Time ?

    Dear Friend ,
    I need to display the PO Creation Time in the output of a report . I know there is a field NAST - UHRVR . I am not sure if this is right . Please advise and if possible a sample code would be of great help .
    Regards & Thanks ,
    Hari
    Message was edited by: Hari  Gopalakrishna

    Hi
    NAST table is for the print so here you can find when a PO was printed not when it was created.
    In the EKKO table there's the field AEDAT (Date on which the record was created), I believe u can know the time by CDHDR (change document) table using EINKBELEG as objectclas
    Max

  • Reinstall system to solve beachball issue, then get files from time machine backup.. will the bring beachball back

    Hi,
    My iMac has a beachball issue to the extent that now it not even starts up anymore, I don't even get to the desktop screen. I plan to reinstall the system from with the CD I got when I purchased the iMac 2 years ago, then update the operating system to the latest version, and then get my files and programs back from my latest time machine backup, which was completed c. 2 weeks ago.
    1) Will this process generally work? I am running Mavericks 10.9, so the CD I want to install from will be an older version, but I then plan to upgrade to 10.9 before accessing the time machine files.
    2) Post upgrading the op system to the latest version, when I then get the programs and files back from time machine, will that bring also back the beach ball issue, or given that everything will be saved and installed 'cleanly' it will be alright?
    I am not a mac pro, so still learning, please forgive if I am not posting required info. Let me know what you need.
    Thanks

    1. Yes.
    2. Depending on what is causing the beachball, restoring may or may not bring the problem back.
    Spinning Beach Ball
    Spinning Beach ball (2)
    Spinning Beach ball (3)
    Spinning Beach ball (4)

  • Need advice (help!) Can I get files from Time Machine to a PC

    My Mac book's HD I think is dead. I have an external HD with Time Machine back ups on it. I really NEED to get my address book contacts off and onto my back up PC, for right now. Is there even a way to do that?? and while Im at it what about iTunes library?
    Please tell me there is a way.

    Chad,
    I must disagree with Nerowolf on this one. You should be able to get the items you need off the drive, even connected to a PC.
    Contrary to what Nerowolf believes, Time Machine stores backups as standard, complete files; it does not make "incremental" backups in the traditional sense. Each and every backup includes every file from the source, and each one is a complete file.
    The trick with Time Machine is that the data associated with those many, many files is only copied to the drive once, and each "iteration" of the same file links to that single copy of the data. The process whereby this occurs is called "multiple hard links," and the resultant files are called "multi-linked files."
    You need not be concerned with all this. The important point is that the files are seen as normal files to you and to the OS.
    The real problem, however, is that those files are stored on a volume formatted as HFS+, and Windows cannot normally access this file system. If you attempt to connect your Time Machine drive to a PC, it will want to format it. If you really need to access the drive, you'll need something like MacDrive, a PC utility that allows Windows to mount and access HFS+ volumes. Look for it on Versiontracker.com (in order to use it, you'll need to pay for it).
    CAVEAT: I do not know with certainty that MacDrive includes compatibility with Multi-linked files. Multi-linking is part and parcel of the HFS+ file system format, so there may be no problem, but you might want to double-check to make sure Multi-linked files are fully supported in MacDrive.
    Scott

  • How to get file created time with FTPClient ?

    Hi,
    Is it possible to get when the file get created with FTPClient?
    I only find the modification time.
    Thanks,

    JNI.

  • Files creation time on digital camera's SD is now offset with timezone

    Been checking out the photos I've took with a digital camera by taking the SD card and mounting it in current (all up to date) Arch. It was weird to see that the latest photos are shown as being in the future. Basically the camera don't know about time zones, and creates files at the date/time I set (based on local time). On the other hand, Arch suddenly interprets that date/time as UTC while I'm actually in UTC+8 - so all the photos appear 8 hours in the future compared to when they were actually taken.
    This is caused by some new change, though not sure how recently. I still have pictures on my SD card from April that I can compare to their copies made on the hard drive. The files on my hard drive (copied from the same card in April) have correct time (are in localtime). Same ones on the SD card are now 8 hours off when I mount now and check them....
    Here's an example, highlighted one of the file on the SD card (left) and on the hard drive copied a few months ago (right). Same file, different interpreted time.
    http://i.imgur.com/XvhVrYT.png
    Similarly for all the subsequent files in the directory as well.
    This is very strange to me, what setting or software can cause such a time error?
    -- mod edit: replaced img with url, please see image guidelines and post thumbnails only.  Trilby --
    Last edited by Trilby (2014-10-12 14:09:45)

    I just couldn't stop %) Made it keep all the options provided by user, not replace them. Much more code now.
    /usr/bin/mount.vfat
    #!/usr/bin/env bash
    OPTS=(
    "time_offset" "$((`date +%:z|sed -r 's/(.)0?(.*):0?/\1\2*60\1/'`))"
    "iocharset" "utf8"
    function _build_opts() {
    local RES="$1"
    local I
    local PROP
    local VAL
    for (( I=0; I<${#OPTS[@]}; I=I+2 )); do
    PROP="${OPTS[I]}"
    VAL="${OPTS[I+1]}"
    if [[ -z "$RES" ]]; then
    RES="$PROP=$VAL"
    elif [[ ! "$RES" =~ (^|^-[^tOo]*o|,)$PROP= ]]; then
    RES="$RES,$PROP=$VAL"
    fi
    done
    echo "$RES"
    ARGS=("$@")
    CNT=${#ARGS[@]}
    APPEND_IDX=-1
    for (( I=0; I<$CNT; I++)); do
    if [[ "${ARGS[I]}" =~ ^-[^tOo]*o.+$ ]]; then
    # bunch of options ending with -oopti=ons: -aoiocharset=utf8
    APPEND_IDX=$I
    break
    elif [[ "${ARGS[I]}" =~ ^-[^tOo]*o$ ]]; then
    # options are separated: -ao opti=ons
    APPEND_IDX=$((I+1))
    break
    elif [[ "${ARGS[I]}" =~ ^-[^tOo]*[tO]$ ]]; then
    # skip next option
    I=$((I+1))
    fi
    done
    if (( APPEND_IDX == -1 )); then
    ARGS[$CNT]="-o$(_build_opts)"
    elif (( APPEND_IDX == CNT )); then
    # rare case: empty -o was the last option
    ARGS[$CNT]="$(_build_opts)"
    else
    ARGS[$APPEND_IDX]="$(_build_opts ${ARGS[$APPEND_IDX]})"
    fi
    mount -itvfat "${ARGS[@]}"
    Last edited by lxyd (2014-10-16 10:31:57)

  • Get the file creation date

    hi friends..
    i searched many forums to get file creation date
    i didnt get the solution but i found one program which execute
    dos command and gets the output of that.
    so using that program i developed a program to get the file creation Date & Time also
    //getCreationDate.java
    import java.io.*;
    import java.lang.*;
    public class getCreationDate {
    public static void main (String args[]){
      try {
         // get runtime environment and execute child process
         Runtime systemShell = Runtime.getRuntime();
          BufferedReader br1=new BufferedReader(new InputStreamReader(System.in));
          System.out.println("Enter filename: ");
          String fname=(String)br1.readLine();
         Process output = systemShell.exec("cmd /c dir "+fname);
           // open reader to get output from process
         BufferedReader br = new BufferedReader (new InputStreamReader(output.getInputStream()));
         String out="";
          String line = null;
          int step=1;
          while((line = br.readLine()) != null )
                if(step==6)
               out=line;
                step++;
                }          // display process output
          try{
          out=out.replaceAll(" ","");
          System.out.println("CreationDate: "+out.substring(0,10));
          System.out.println("CreationTime: "+out.substring(10,16)+"m");
          catch(StringIndexOutOfBoundsException se)
               System.out.println("File not found");
       catch (IOException ioe){ System.err.println(ioe); }
       catch (Throwable t) { t.printStackTrace();}
    }

    Following line should be modified to make it work on all platforms:
    Process output = systemShell.exec("cmd /c dir "+fname);

  • Sort file based on Creation Time in Windows XP/2003

    Hi All,
    I want ot sort files in a folder based on the Creation time, not the modified time.
    We can get the creation time with dir /tc DOS command.
    Now i want to capture the output and sort it based on creation time. How i do it.Please explain with code.
    Thanks.

    Hi Aaron,
    Based on my research, these Events could be caused by the fact that you haven’t
    configured the
    security access control list (SACL) on the object that you are auditing or you have configured the SACL, but not for all the listed accesses.
    Here is a KB article below that I suggest you refer to:
    Event IDs 560 and 562 appear many times in the security event log
    http://support.microsoft.com/kb/841001/en-us
    I hope this helps.
    Best Regards,
    Amy Wang

  • How can I get the File Creation Date OR Last modification date of the incoming file in my message?

    I need the Last Modification Date and the File creation date of the consumed file in my message, is it possible to do that using a custom pipeline component in decode stage or any other way? The FILE namespace have File creation time that actually gives
    the time the file was dropped in receive location, not the actual creation time. Also this namespace doesn't have the Last Modification Date.

    Yes,
    As per MSDN, "File.FileCreationTime" - "Defines the time that the file was written to the folder that is monitored by the File receive
    adapter."
    So for File Modified DateTime, only option I can think of is create a custom file adapter (updating the File Adapter code from SDK ..\SDK\Samples\AdaptersDevelopment\File Adapter) and access the received file with the code something like the following, which
    you give you the Last Modified date
    string sLastModifiedDate = File.GetLastWriteTime(path).ToString();
    If there are any business requirements which drives you this, then this the only way I can think of. Because you can access the file properties only in adapter, when it passes through adapter file is handled as stream and you will only have context properties
    to access the file related properties.
    If you're looking for implement this for any audit purpose or for your any technical purpose, then you can suggest some alternate than using File updated datetime.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Quicktime Meta-data Access (Creation Time)

    Greetings,
    I'd like to be able to pull the creation time from a quicktime file. A bit of browsing at Apple's QT site left me quite confused. It does seem, however, that the time (or was it just the date) is available as a tag inside the QT file. Anybody have a working bit of code I can steal??
    Background: My digital camera (Kodak 3600) lets me shoot quicktime snippets. But, their transfer software is broken (misorders files). It also doesn't do the file management the way I want it to be done :) So, anyway, I'm putting together a simple swing client to handle the chore. I'd like to be able to get the creation time from the metadata, so I can correctly order the images/videos on my PC archive. I have successfully used JExif to grab Exif tags from the JPGs, and would like to get similar info from the metadata inside the quicktime file.
    Thanks very much for your help,
    Bill Nace

    Don't have working code (though it's an interesting little thing to try when I get back home), but if you're willing to switch from JMF to QuickTime for Java, the "Media" class in that API has a getCreationTime() method that is probably what you're looking for. This returns an int that represents the number of seconds (not milliseconds) elapsed since Midnight, Jan 1, 1904 (ie, the Beginning of Macintosh Time).
    As for getting the Media, start with a Movie, get the right Track, then do Track.getMedia().getCreationTime(). Appropriate caveats about QTJ's difficulty apply, as do apologies for bringing it up in this forum.
    Shot in the dark, but it looks like that's how you do it in QTJ. Don't know if JMF exposes this meta-data in any way (kinda thinking not...)
    --invalidname

  • SSIS 2012 Script Task to Get File Properties

    Hello,
    I researched on how to grab a file properties such as file size, file modified date, etc and I came across the following
    link:
    I followed exact steps and when I went to execute the package, I got the following error:
    Below is the code:
    // C# code
    // Fill SSIS variables with file properties
    using System;
    using System.Data;
    using System.IO; // Added to get file properties
    using System.Security.Principal; // Added to get file owner
    using System.Security.AccessControl; // Added to get file owner
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_cb8dd466d98149fcb2e3852ead6b6a09.csproj
    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    #region VSTA generated code
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion
    public void Main()
    // Lock SSIS variables
    Dts.VariableDispenser.LockForRead("User::FilePath");
    Dts.VariableDispenser.LockForWrite("User::FileAttributes");
    Dts.VariableDispenser.LockForWrite("User::FileCreationDate");
    Dts.VariableDispenser.LockForWrite("User::FileExists");
    Dts.VariableDispenser.LockForWrite("User::FileInUse");
    Dts.VariableDispenser.LockForWrite("User::FileIsReadOnly");
    Dts.VariableDispenser.LockForWrite("User::FileLastAccessedDate");
    Dts.VariableDispenser.LockForWrite("User::FileLastModifiedDate");
    Dts.VariableDispenser.LockForWrite("User::FileOwner");
    Dts.VariableDispenser.LockForWrite("User::FileSize");
    // Create a variables 'container' to store variables
    Variables vars = null;
    // Add variables from the VariableDispenser to the variables 'container'
    Dts.VariableDispenser.GetVariables(ref vars);
    // Variable for file information
    FileInfo fileInfo;
    // Fill fileInfo variable with file information
    fileInfo = new FileInfo(vars["User::FilePath"].Value.ToString());
    // Check if file exists
    vars["User::FileExists"].Value = fileInfo.Exists;
    // Get the rest of the file properties if the file exists
    if (fileInfo.Exists)
    // Get file creation date
    vars["User::FileCreationDate"].Value = fileInfo.CreationTime;
    // Get last modified date
    vars["User::FileLastModifiedDate"].Value = fileInfo.LastWriteTime;
    // Get last accessed date
    vars["User::FileLastAccessedDate"].Value = fileInfo.LastAccessTime;
    // Get size of the file in bytes
    vars["User::FileSize"].Value = fileInfo.Length;
    // Get file attributes
    vars["User::FileAttributes"].Value = fileInfo.Attributes.ToString();
    vars["User::FileIsReadOnly"].Value = fileInfo.IsReadOnly;
    // Check if the file isn't locked by an other process
    try
    // Try to open the file. If it succeeds, set variable to false and close stream
    FileStream fs = new FileStream(vars["User::FilePath"].Value.ToString(), FileMode.Open);
    vars["User::FileInUse"].Value = false;
    fs.Close();
    catch (Exception ex)
    // If opening fails, it's probably locked by an other process
    vars["User::FileInUse"].Value = true;
    // Log actual error to SSIS to be sure
    Dts.Events.FireWarning(0, "Get File Properties", ex.Message, string.Empty, 0);
    // Get the Windows domain user name of the file owner
    FileSecurity fileSecurity = fileInfo.GetAccessControl();
    IdentityReference identityReference = fileSecurity.GetOwner(typeof(NTAccount));
    vars["User::FileOwner"].Value = identityReference.Value;
    // Release the locks
    vars.Unlock();
    Dts.TaskResult = (int)ScriptResults.Success;
    Eventually I am looking to just grab the Modified Date from the Windows Explorer folder and insert into table. Any suggestions? Thank you in advance!
    Sanjeev
    Sanjeev Jha

    Hi SSISJoost,
    I am so glad you responded to this thread. You are absolutely right. I copied the entire code including the project name (guid) and that solved the error problem.
    Now, what did you do to get the message box? I added the watch and I could see the values but how do I get these values in a table? If I remember correctly, in your blog, you mentioned something about using derived columns. I am familiar with Derived Columns
    but how do I do that? I appreciate your response.
    Thank you.
    Sanjeev
    Sanjeev Jha
    I used a second script task to show all variable values. It has a
    MessageBox in it and between all
    variables I added a
    newline to make it more readable...
    But with an Execute SQL Task and parameters you can also put these values in a Table... or you can read the file in a Data Flow Task and add those variables (as metadata) to each record with a Derived Column
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • FINDER: File Date & Time Slow to Update

    In finder windows my date and time is slow to "update" when I've changed a file. Viewing by "Date Modified" is worthless sometimes. I change & save a file, view in finder and the date & time has not updated. Update times vary from immediate to minutes...
    Surely this isn't typical? The systme can't handle getting file date&time updated?
    10.4.7 on Dual 1Gz machine.
    comments?

    Hi, Greg.
    I've seen this happen from time to time myself. In my case it has been very rare and I've been unable to pin down a cause. It appears to be a bit of a glitch in Finder. It's usually seen with server-mounted volumes even though it was supposedly fixed in Tiger after being a regular issue with shared volumes in Panther.
    Some ideas:
    • Temporarily switching the View from say List to Icon and Back often corrects this.
    • You might want to take a look at Nudge.
    • If it's happening at high frequency, purging your Finder preferences may help. See my "Finder Issues? How to delete its preferences" FAQ.
    • You may want to try Path Finder, an alternative Finder. You can use Finder and Path Finder simultaneously.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Material determ type - Creation Time

    Hi,
    There is a condition record created for the Material (Material determ type ),I can see the record in table : KOTD910.
    Please let me know where can i find the "Creation Time" and " Creation Date " for that Material determ type.
    I have checked the CDHDR and KONH tables , but i am not able to get the Creation TIME.
    Thanks,
    sudheer

    Hi,
    I checked out the table name KOTD910, but there is no such table.
    Kindly clarify.
    Regards,
    Prerna

Maybe you are looking for

  • Box in a scripts

    Hi all, I want create a box in a scripts what is the syntax for that. plz provide the syntax for that. Thanks, Surya.

  • Header for text in report

    Hi All, I have a Infoobject A , which is displayed inside a report. I have set the display as Key and Text. I need a column header for the TEXT. i.e Material Category(Key)   Material category (text) 001                              Saw machine 002   

  • M8496 ERROR FM parked invoice

    Hello, SAPAPPL 606 I have carried forward a PO with all document chain to the year X+1. A "parked invoice" is in the chain with posting date X. I would like to modify that posting date ( to X+1) of the parked document and so a new financial and logis

  • Three external SWF's - not smooth. Fla included

    Hey geniuses. I have a main Flash movie that preloads three external SWF's just perfectly.  Everything is great...except the 1st movie is not smooth and really slow, the 2nd movie is a little better, and the third movie is the best. You can see what

  • Very weird font problem which appeared suddenly

    I have no idea how to describe the problem as I am no native speaker. The following screenshot shows the problem, it has yet only occured within Firefox: http://i.imgur.com/zNegO.png The circled slash should be either fi, fl, or ff (like I have indic