Re: Need some help...



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








.



Relevant Pages

  • Re: Need some help...
    ... Path.ChangeExtension(Path.Combine(strTargetDir, strDeepestNode), ".cab"), ... Console.Writeline command line, I got a string of text showing the path ... Param 1 - _Folder, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Graph traversieren wie ein Petri-Netz
    ... @param strValue zu prüfender String ... public static final boolean empty{ ... @param strBuffValue zu prüfender StringBuffer ...
    (de.comp.lang.java)
  • Re: Hashtable question
    ... * @param modelName is a filename less the .pim extension where the ... public void load() throws IOException { ... public void add(String keyString, Item item) ... * @param keyString the string to lookup by. ...
    (comp.lang.java.programmer)
  • Re: which JAR to use ?
    ... scan for a string that leads into the piece you want with indexOf. ... public static String getWantedCurrencies throws IOException ... * @param result Results to save, ... public static String get(String websiteURL, String relativeURL, ...
    (comp.lang.java.programmer)
  • Re: Time - BuffererdReader takes read in data - store in hash Map TAKING FOREVER
    ... then convert to string, then parse it yourself. ... @param prefix ... @exception IOException ... public static byterawReadEntireFile (File fromFile) throws ...
    (comp.lang.java.programmer)

Loading