By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

How to Burn to cd from VB

ID94
P: 4
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?
Nov 6 '06 #1
Share this Question
Share on Google+
1 Reply


sashi
Expert 100+
P: 1,754
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.

Expand|Select|Wrap|Line Numbers
  1. Dim objFSO As Object
  2. Dim objFolder as Object
  3. Dim i As Long
  4.  
  5. Set objFSO = CreateObject("Scripting.FileSystemObject")
  6. Set objFolder = objFSO.GetFolder("C:\Program Files")
  7. i = objFolder.Size
  8.  
  9. Set objFolder = Nothing
  10. Set objFSO = Nothing
  11.  
This will return the size of the folder in bytes.
Nov 7 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.