Re: Need some help...
- From: "Bruce W. Darby" <kracor@xxxxxxxxxxx>
- Date: Sun, 17 Dec 2006 13:33:51 -0700
Stephany,
After posting last night, I ran back through my code and there was a LOT of
stuff that I discovered about my code being incomplete and illogical.*sigh*
I was pointing one directory too high AND was not using the correct source
to draw from. Took a bit for me to work it out, but found that I was using
the destination folder as my source folder and was getting some really weird
results. Tom's post last night and yours this morning really helped me get
things ironed out in my mind. Incorporating the parts that you posted this
morning, here is my new compression sub, hopefully all neat and tidy. I know
that this one works as it should. LOL I've also decided to use labels with
autoellilpsis turned on in place of the text boxes. I did this as a personal
attribute because of space issues and my own anal perspective toward
neatness. I am doing the sanity check on the label entries from a seperate
sub so that is taken care of. If the user doesn't select a From and To
folder, it won't go anwhere but back to the folderbrowserdialog. Thanks
again for all the help.
The (hopefully) almost completed compression sub...
Private Sub CompressFolder(ByVal strSourceDir As String, ByVal strTargetDir
As String)
Dim _Folders As String() = Directory.GetDirectories(strSourceDir)
prbProgress.Maximum = _Folders.Length
prbProgress.Step = 1
prbProgress.Visible = True
lblProgress.Visible = True
For Each _Folder As String In _Folders
Dim strFinalFile As String = Path.ChangeExtension(Path.Combine(strTargetDir,
_
Path.GetFileName(_Folder)), "cab")
lblProgress.Text = ("Compressing: " & Path.GetFileName(_Folder))
lblProgress.Update()
Dim i_Compress As New CabLib.Compress
i_Compress.CompressFolder(_Folder, strFinalFile, "", 0)
prbProgress.PerformStep()
prbProgress.Update()
Next
prbProgress.Visible = False
lblProgress.Visible = False
End Sub
.
- Follow-Ups:
- Re: Need some help...
- From: Stephany Young
- Re: Need some help...
- References:
- Need some help...
- From: Bruce W. Darby
- Re: Need some help...
- From: Stephany Young
- Re: Need some help...
- From: Bruce W. Darby
- Re: Need some help...
- From: Stephany Young
- WAS: Need some help...
- From: Bruce W. Darby
- Re: Need some help...
- From: Stephany Young
- Need some help...
- Prev by Date: anchoring
- Next by Date: Re: Global Functions
- Previous by thread: Re: Need some help...
- Next by thread: Re: Need some help...
- Index(es):
Relevant Pages
|