467,880 Members | 1,142 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,880 developers. It's quick & easy.

How to Burn to cd from VB

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?
Nov 6 '06 #1
  • viewed: 2151
Share:
1 Reply
sashi
Expert 1GB
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.

Similar topics

9 posts views Thread by hokiegal99 | last post: by
2 posts views Thread by Bernie | last post: by
5 posts views Thread by Sobhan.Vezzu | last post: by
2 posts views Thread by Elioth | last post: by
6 posts views Thread by SStory | last post: by
1 post views Thread by =?Utf-8?B?ZGF2aWQ=?= | last post: by
6 posts views Thread by Academia | last post: by
4 posts views Thread by Jerry Spence1 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.