vb.net pass folder path as commandline argument -


i'm trying pass folder path via commandline argument application.

problem: folder path contains space " " in it's string. when read commandline arguments in application path chopped pieces on space " "

sub main()      dim arguments string() = system.environment.getcommandlineargs()     each arg string in arguments         console.writeline("argument : " & arg)     next      console.readline()  end sub 

edit: added code build argument

private sub btn_copy_click(sender object, e eventargs) handles btn_copy.click      dim args(3) string     args(0) = """" & tb_copyfrompath.text & """"     args(1) = """" & tb_copytopath.text & """"     args(2) = """" & tb_itemtag.text & """"     args(3) = """" & tb_prefix.text & """"      dim argument string     argument = args(0) & " " & args(1) & " " & args(2) & " " & args(3)      process.start("j:\vb.net - em addin\em_design_addin\copydesign\bin\debug\copydesign.exe", argument) end sub 

this result isn't okay. first argument of first path contains piece of second path.

screenshot


edit: add value result debug.

"""c:\vaultworkspace\cadcampc\03-vessel configurator - r2.0\nozzles\wn_rf_asme_b16.5\"" ""c:\vaultworkspace\cadcampc\03-vessel configurator - r2.0\test copy design\n03"" ""n3"" ""12345-3""" 

it simple. use ". if pass test test test parameters, you'll 3 arguments. if write test "test test", you'll receive 2 parameters: test , test test.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -