modified date of the file

Discussion in 'Excel Programming' started by naveencn023@gmail.com, Apr 11, 2014.

  1. Guest

    HI,

    I have the folder( sub folders) keywords in column A and the folder paths in column B. I need to macro to search the folder with the keyword in the path and it should throws message "PASS" if folder exists or "FAIL" if folderdoesn't exists in column C. Also if folder exists, it should show last modified date in column D.

    Please do the needful.

    Thanks in advance for your help..
     
    , Apr 11, 2014
    #1
    1. Advertisements

  2. Auric__ Guest

    naveencn023 wrote:

    > I have the folder( sub folders) keywords in column A and the folder
    > paths in column B. I need to macro to search the folder with the keyword
    > in the path and it should throws message "PASS" if folder exists or
    > "FAIL" if folder doesn't exists in column C. Also if folder exists, it
    > should show last modified date in column D.
    >
    > Please do the needful.
    >
    > Thanks in advance for your help..


    Did you try to do it yourself? If so, post what you've already got, so we can
    give you some pointers.

    If not, I'll do it for you, US$1000, paid in advance, no refunds.

    --
    You'd have better luck trying to artificially inseminate a brick.
     
    Auric__, Apr 13, 2014
    #2
    1. Advertisements

  3. GS Guest

    > naveencn023 wrote:
    >
    >> I have the folder( sub folders) keywords in column A and the folder
    >> paths in column B. I need to macro to search the folder with the
    >> keyword in the path and it should throws message "PASS" if folder
    >> exists or "FAIL" if folder doesn't exists in column C. Also if
    >> folder exists, it should show last modified date in column D.
    >>
    >> Please do the needful.
    >>
    >> Thanks in advance for your help..

    >
    > Did you try to do it yourself? If so, post what you've already got,
    > so we can give you some pointers.
    >
    > If not, I'll do it for you, US$1000, paid in advance, no refunds.


    <bg>!

    --
    Garry

    Free usenet access at http://www.eternal-september.org
    Classic VB Users Regroup!
    comp.lang.basic.visual.misc
    microsoft.public.vb.general.discussion
     
    GS, Apr 13, 2014
    #3
  4. Guest

    On Sunday, April 13, 2014 9:43:53 AM UTC+5:30, Auric__ wrote:
    > naveencn023 wrote:
    >
    >
    >
    > > I have the folder( sub folders) keywords in column A and the folder

    >
    > > paths in column B. I need to macro to search the folder with the keyword

    >
    > > in the path and it should throws message "PASS" if folder exists or

    >
    > > "FAIL" if folder doesn't exists in column C. Also if folder exists, it

    >
    > > should show last modified date in column D.

    >
    > >

    >
    > > Please do the needful.

    >
    > >

    >
    > > Thanks in advance for your help..

    >
    >
    >
    > Did you try to do it yourself? If so, post what you've already got, so we can
    >
    > give you some pointers.
    >
    >
    >
    > If not, I'll do it for you, US$1000, paid in advance, no refunds.
    >
    >
    >
    > --
    >
    > You'd have better luck trying to artificially inseminate a brick.


    Hi,

    I have the below mentioned code which will retrieve only file present/ not and i want to retrieve last modified date of the file too...


    Sub IsItThere()
    Dim KeyWd As String
    Dim Pathh As String, fName As String
    Dim N As Long, J As Long
    N = Cells(Rows.Count, "A").End(xlUp).Row
    For J = 1 To N
    KeyWd = Cells(J, 1).Value
    Pathh = Cells(J, 2).Value
    If Right(Pathh, 1) = "\" Then
    Pathh = Mid(Pathh, 1, Len(Pathh) - 1)
    End If
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace((Pathh))

    For Each strFileName In objFolder.Items
    fName = objFolder.GetDetailsOf(strFileName, 0)
    If InStr(1, fName, KeyWd) > 0 Then
    Cells(J, 3).Value = "File Present"
    GoTo NextRecord
    End If
    Next
    Cells(J, 3).Value = "File Not Present"
    NextRecord:
    Set objFolder = Nothing
    Set objShell = Nothing
    Next J
    End Sub
     
    , Apr 18, 2014
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Josh Sale

    File's last modified date

    Josh Sale, Jan 12, 2004, in forum: Excel Programming
    Replies:
    2
    Views:
    66
    Josh Sale
    Jan 12, 2004
  2. Don Guillett

    Change File DATE created & modified

    Don Guillett, Apr 26, 2005, in forum: Excel Programming
    Replies:
    3
    Views:
    98
    Dave Peterson
    Apr 26, 2005
  3. mikeburg

    Obtain imported file modified date

    mikeburg, Jan 18, 2006, in forum: Excel Programming
    Replies:
    2
    Views:
    95
    Toppers
    Jan 18, 2006
  4. JustinP

    Get the date a file was modified

    JustinP, Sep 5, 2006, in forum: Excel Programming
    Replies:
    2
    Views:
    59
    Bob O`Bob
    Sep 5, 2006
  5. Just Me

    File modified date problem

    Just Me, Nov 10, 2006, in forum: Excel Programming
    Replies:
    2
    Views:
    72
    Just Me
    Nov 11, 2006
  6. Junior728

    find latest date modified file

    Junior728, Jun 6, 2007, in forum: Excel Programming
    Replies:
    1
    Views:
    100
    NickHK
    Jun 6, 2007
  7. MarkS

    Getting file name and Modified date

    MarkS, Sep 14, 2007, in forum: Excel Programming
    Replies:
    2
    Views:
    82
    urkec
    Sep 14, 2007
  8. webels

    Extracting date file modified from a text file.

    webels, Apr 19, 2010, in forum: Excel Programming
    Replies:
    4
    Views:
    153
    webels
    Apr 19, 2010
Loading...