subfolders and fso.GetFolder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhavdahl
    New Member
    • Mar 2008
    • 4

    subfolders and fso.GetFolder

    Is there a property setting of some kind so that GetFolder will include all subfolders and files in the object folder?

    I'm using VBScript. I hope this topic covers script. It looked like it did. Sorry if this is in the wrong place.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by bhavdahl
    Is there a property setting of some kind so that GetFolder will include all subfolders and files in the object folder?
    It does. Why, what's the problem?

    Comment

    • bhavdahl
      New Member
      • Mar 2008
      • 4

      #3
      [code=VB]
      strFrom1 = "C:\Documen ts and Settings\havdah bg\My Documents\"

      Set objFromFolder = fso.GetFolder(s trFrom1)
      For Each objFile In objFromFolder.F iles
      fso.CopyFile objFile, objToFolder & "\"
      Next
      [/code]

      This just copies the files in the FromFolder and doesn't get any subfolders and files.
      Last edited by Killer42; Mar 6 '08, 10:02 PM. Reason: Fixed broken CODE tag

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Well, what do you expect to find in the Files collection? Try having a look at the SubFolders property. :)

        Comment

        Working...