jimmari73
30th December 2008, 08:46
Hi,

Can you help me please.

I am using app_start, because i need see from a directory, any file and execute with the tipe of file , the application associated, by example , i read a file prueba.xls, then excel is executed.

My problem is when i tried to read a file whit a large name, by example:
prueba 123 es excel.xls, the application does not work.


tnks

shah_bs
30th December 2008, 10:51
This reply is based on BAAN IV c3 experience. I have found that filenames with SPACES are not acceptable.

If you can decide on a file naming convention that is without SPACES, life will be so much easier. For example, your file could be named as:

prueba_123_es_excel.xls

replacing the spaces by the underscore character.

mark_h
30th December 2008, 15:56
I agree with shah_bs. You can try adding quotes chr$(34) around the file name, but it seems to me even that did not work for us. I know now even under 4c4 we do not use spaces in file names.

NPRao
30th December 2008, 19:23
In LN Tools, this code segment works:

| target = "c:\temp\" & filename
|# Creation of local directory not supported in WebTop
target = "${BSE_TMP}\" & filename
e = server2client(fpath, target, false, true)
if e = 0 then
target = quoted.string(target)
if flagwait <> 0 then
ret = start.application.local(target, true, exitcode)
remove.local.file(target)
else
ret = start.application.local(target, false, exitcode)
|* app.id = app_start("excel " & target, "", "", "", "")
|* while app_status(app.id)
|* suspend(3000)
|* |* Wait 3 seconds before checking the next time
|* endwhile
endif
if not ret then
mess("zmadms0113", 1) |* Application failed to start
endif
else
mess("zmadms0020", 1)
|* Error - source file not copied to the destination file
endif