+ Reply to Thread
Results 1 to 5 of 5

Copying file name

  1. #1
    Registered User
    Join Date
    08-10-2007
    Posts
    36

    Copying file name

    Hello everyone,

    Is it possible to create a mcro in excel to copy file names from a folder and have it in spread sheet for a particualr date modified.

    I am spending too much of time in copying these file names from a folder. I know we can do it from DOS, but i needed to have it using excel macro

  2. #2
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    hi,

    are you saying you have lots of excel files in a folder and you want the file names in one worksheet?

    please explain "for a particualr date modified."

    steve

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    First go to Vba editor
    Alt F11
    Goto tools=>references
    scroll down and check
    Microsoft scripting runtime and click OK
    next go to insert=>module and paste this code there
    Please Login or Register  to view this content.
    Change the folder destination in the code example:
    Set objFol = objFSO.GetFolder("C:\Excel")
    this will extract the files from c:\Excel folder
    now run the code,

  4. #4
    Registered User
    Join Date
    08-10-2007
    Posts
    36
    Thanks for the reply Dave,

    This macro gives me all the file names from a given folder with date modified column. I want to have only the given date modified files. It should ask for the modified date and should diplay only the those date modified files.

    I would like to add one more criteria for this. It should diplay only the file name which contains the word "xyz".

  5. #5
    Registered User
    Join Date
    08-10-2007
    Posts
    36
    Could anyone please let me know if it is possible

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1