+ Reply to Thread
Results 1 to 2 of 2

Thread: Cut and Paste folder information

  1. #1
    Registered User
    Join Date
    02-03-2011
    Location
    alabama
    MS-Off Ver
    Excel 2007
    Posts
    6

    Cut and Paste folder information

    Not sure if this is the right place to ask this, but.....

    Is there a way to cut and paste (into excell - preferably) the information inside a folder? For example, when you drill down into a folder to view its contents - name, size, date modified etc.

    I need to be able to cut and paste all that information, from different folders, so I can keep track of overal progress on a project. I can cut and paste the name, but that brings with it the actual file - which I don't want. Print screen doesn't work either. And I really need the date modified information. So far, I can't find any way to copy that info.

    Any help would be greatly appreciated.


    Thanks.

  2. #2
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,160

    Re: Cut and Paste folder information

    Hi runnymede15june1215
    the folder infomation attributes can be access like files eg...
    Sub InfFolder()
        Dim fs, strFolder As String, objFolder, colFiles
        strFolder = InputBox("Enter the folder full name:")
        Set fs = CreateObject("Scripting.FileSystemObject")
        Set objFolder = fs.GetFolder(strFolder)
        Set colFiles = objFolder.Files ' files in in folder is a collection
        MsgBox "files in the folder:= " & colFiles.Count & chr(10) & _
               " Path:= " & objFolder.Path & chr(10) & _
               " size:= " & objFolder.Size & chr(10) & _
               " Parent Folder:= " & objFolder.ParentFolder & chr(10) & _
               " attributes:= " & objFolder.Attributes & chr(10) & _
               " date created:= " & objFolder.DateCreated & chr(10) & _
               "drive:= " & objFolder.Drive & chr(10) & _
               "type:= " & objFolder.Type
    
    End Sub
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

+ 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.2.0