Re: Need some help...
- From: "Stephany Young" <noone@localhost>
- Date: Mon, 18 Dec 2006 19:24:31 +1300
Let me get my black leather basque and thigh boots on and let me grap my
whip.
'You know what happens to naughty boys don't you!!!!!!!!!!'
Now we've got the punishment out of the way, are you saying that:
i_Compress.CompressFolder(strFolder,
Path.ChangeExtension(Path.Combine(strTargetDir, strDeepestNode), ".cab"),
"", 0)
still doesn't work and that:
Dim strFinalFile As String =
Path.ChangeExtension(Path.Combine(strTargetDir, strDeepestNode), ".cab")
i_Compress.CompressFolder(strFolder, strFinalFile)
does work?
If that is the case then I'll fall off my chair because it worked for me
even with space charactes in the paths.
"Bruce W. Darby" <kracor@xxxxxxxxxxx> wrote in message
news:PJ6dnRJG5_IyrBvYnZ2dnUVZ_uqvnZ2d@xxxxxxxxxxxxxx
Stephany,
I'm going to hold out my wrist and let you slap it, OK?? You are correct.
I had temporarily changed the
Path.GetFilename(_Folder) to simply '= _Folder' to try something after
reading one of your messages. When I noted that it was providing the full
path, I changed it back to the original. But I mada the copy of the line
prior to changing it back without realizing that I would throw everything
out of whack. Told you I was senile. :) I posted the working sub under
your other response earlier.
"Stephany Young" <noone@localhost> wrote in message
news:%23mG5immIHHA.2232@xxxxxxxxxxxxxxxxxxxxxxx
Another Paint Shop Pro X user. That makes 2 I know of now. :)
I would expect strDeepestNode to have a value of Brushes rather than the
full path, because strDeepestNode is assigned the result of
Path.GetFilename(_Folder).
If strTargetDir is "C:\Temp" then I would expect the result of
Path.ChangeExtension(Path.Combine(strTargetDir, strDeepestNode), "cab")
to be "C:\Temp\Brushes.cab".
What happens if you use paths that don't have any spaces in them?
It's possible that the CabLib library has a 'bug' in it but I would be
inclined to make sure that I am sure that my own code is correct and what
the behaviours are before I start going down that path.?
"Bruce W. Darby" <kracor@xxxxxxxxxxx> wrote in message
news:T9udnceeFs8FvBvYnZ2dnUVZ_r6vnZ2d@xxxxxxxxxxxxxx
Stephany,
I'm far too lazy to type that much code into a newsgroup window... LOL
Trust me when I say that I've made prodigious use of the Ctrl-C/Ctrl-V
option.
Now on with the show...
When I commented out the i_Compress.CompressFolder line and used your
Console.Writeline command line, I got a string of text showing the path
of the compressed file, as follows
strSourceDir "C:\Program Files\Corel\Corel Paint Shop Pro X" String
strDeepestNode "C:\Program Files\Corel\Corel Paint Shop Pro X\Brushes"
String
But I went just a little bit further and changed the Console.Writeline
portion of the command line to i_Compress.CompressFolder. As soon as I
left that line, three errors popped up in the IDE. Here they are...
Error 1 Argument not specified for parameter 's_CabFile' of 'Public Sub
CompressFolder(s_Folder As String, s_CabFile As String, s_Filter As
String, s32_SplitSize As Integer)'. D:\Program Files\Microsoft Visual
Studio\Projects\Folder Archive\Folder Archive\Folder Archive\Form1.vb
129 13 Folder Archive
Error 2 Argument not specified for parameter 's_Filter' of 'Public Sub
CompressFolder(s_Folder As String, s_CabFile As String, s_Filter As
String, s32_SplitSize As Integer)'. D:\Program Files\Microsoft Visual
Studio\Projects\Folder Archive\Folder Archive\Folder Archive\Form1.vb
129 13 Folder Archive
Error 3 Argument not specified for parameter 's32_SplitSize' of 'Public
Sub CompressFolder(s_Folder As String, s_CabFile As String, s_Filter As
String, s32_SplitSize As Integer)'. D:\Program Files\Microsoft Visual
Studio\Projects\Folder Archive\Folder Archive\Folder Archive\Form1.vb
129 13 Folder Archive
These are the same errors I was receiving when I tried what you
suggested, which is why I believe that there may be a bug in the .dll
because it's (possibly) parsing the command strings only for commas and
when it sees one, it goes looking for the next piece of the puzzle
instead of trying to make sure the piece I've provided it really fits.
When I present it with just a variable it behaves as it should. :)
P.S. In the last message I posted with the leading params, I did make a
typo, but I was trying to illustrate how I thought the .dll was parsing
it's commands and got in a rush and just typed stuff in. The actual code
doesn't have that colon at the end of "cab". Sorry.
"Stephany Young" <noone@localhost> wrote in message
news:u%23X2PrlIHHA.1816@xxxxxxxxxxxxxxxxxxxxxxx
Typo!!!!!
Directly following the b of cab should be a " - you have a :
FYI, I get the impression that you are typing your code into the
message rather than copying and pasting it. If you are then it is too
open to typo's etc. and we are scratching our heads to figure out how
you even managed to compile it etc.
When you do copy and paste code from the IDE into a message it may look
like a load of rubbish. Simply do a Format/Rich Text (HTML) from the
menu and then do a Format/Plain Text and it will look OK.
Now the big question is, what result do you get when you execute?:
Console.WriteLine(Path.ChangeExtension(Path.Combine(strTargetDir,
_deepestnode), "cab"))
"Bruce W. Darby" <kracor@xxxxxxxxxxx> wrote in message
news:VqWdneF3JYlJlBvYnZ2dnUVZ_qOpnZ2d@xxxxxxxxxxxxxx
"Stephany Young" <noone@localhost> wrote in message
news:O5OSlwjIHHA.448@xxxxxxxxxxxxxxxxxxxxxxx
I don't understand why the call to i_Compress.CompressFolder is not
working. It takes 4 parameters and they are:
The second parameter is what causes the failure. It is somehow not
seeing that I'm attempting to pass 'one' simple parameter. I'm
thinking that it's catching the commas in the Path.Combine method and
thinking that it's getting five or six parameters rather than four. In
software testing terms, I'd say that was a bug. LOL
Example:
Param 1 - _Folder,
Param 2 -
Path.ChangeExtension(Path.Combine(strTargetDir,_deepestNode),
Param 3 -"cab:),
Param 4 - "",
Param 5 - 0
_Folder,
Path.ChangeExtension(Path.Combine(strTargetDir, _deepestnode),
"cab")
""
0
.
- Follow-Ups:
- Re: Need some help...
- From: Bruce W. Darby
- 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
- Re: 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
- Re: 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
- Re: Need some help...
- From: Bruce W. Darby
- Need some help...
- Prev by Date: RE: Problem with a modal dialog box called with VB
- Next by Date: Re: Need some help...
- Previous by thread: Re: Need some help...
- Next by thread: Re: Need some help...
- Index(es):
Relevant Pages
|