How to Burn to cd from VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ID94
    New Member
    • Oct 2006
    • 4

    #1

    How to Burn to cd from VB

    Im in need of some code that can burn a folder to a cd. is there a way to check what size a folder is beforehand?
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Originally posted by ID94
    Im in need of some code that can burn a folder to a cd. is there a way to check what size a folder is beforehand?
    Hi there,

    Yes, there is a way to get folder size using VB & FSO, firstly add reference to Scripting Runtime Engine, use the below code segment, hope it helps. Good luck & take care.

    Code:
    Dim objFSO As Object
    Dim objFolder as Object
    Dim i As Long
    
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder("C:\Program Files")
    i = objFolder.Size
    
    Set objFolder = Nothing
    Set objFSO = Nothing
    This will return the size of the folder in bytes.

    Comment

    Working...