I just make each file name encapsulated with ' eg if i would like to use /home/steven/My Documents/some.txt
as a location I would do path = "'/home/steven/My Documents/some.txt'" and the the shell cmd will work correctly like this cmd = "gedit " & path shell cmd .... remember shell is just like using bash, so put ' around the paths you need to use. Sorry I can not give an example with pdftk, but you should be able to modify the example to suit you needs. Steven On Wed, 2010-05-26 at 09:03 +0200, gregor wrote: > Hi, > > I create a little GUI to merge several pdfs with a background. > The syntx for pdftk is 'pdftk [inputpath/inputfile] background > [backgroundfile] output [outputpath/outputfile]' > > With no blanks in [*] there is no problems, with blanks the shell need a > quote for the blank. > > No I use the variant 'pdftk REPLACE([inputfile]," ",CHR(92)&" ") background > REPLACE([backgroundfile]," ",CHR(92)&" ") output REPLACE([outputfile]," > ",CHR(92)&" ")' > > It work but is a little bit ugly,... > > Maybe there is a better way? > > When I tried it so: > inputpath = REPLACE(DirChooser1.Value," ",CHR(92)&" ") I got a String wich > seems right, but the function DIR(inputpath) had a problem with it,... > > Bye > > Gregor > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user