bdittmar
12th April 2002, 15:05
using a db-stringfiled (path) to store a path to a file
e.g. f:\g\it\path1\

BaaN result is f:\\g\\it\\path1\\

how to manipulate this string to get only one backslash ?

Thanks for answer
:confused:

agramm
12th April 2002, 15:39
This is ok and must be saved in this way, because "\" is a control sign.

j. streun
11th June 2003, 20:28
Did you get this to work for you? I've just run into the same problem and it seems when the function client2server looks for the file on the local PC, it can't locate it. I am re-developing a script in Baan V that existed in this format on Baan IV so I know it should work.

Any suggestions would be greatly appreciated :)

bdittmar
12th June 2003, 10:16
Originally posted by j. streun
Did you get this to work for you? I've just run into the same problem and it seems when the function client2server looks for the file on the local PC, it can't locate it. I am re-developing a script in Baan V that existed in this format on Baan IV so I know it should work.

Any suggestions would be greatly appreciated :)

I solved the problem by using organized paths in my baan application.
Like app_start("application drive\path\"&file)

j. streun
12th June 2003, 21:31
bdittmar -
Thank you for your response. I was able to get the app_start function to work but I wasn't able to work with the data.

However, I did eventually find a solution - here's what I found: First of all, Baan doesn't seem to like file names like "ABC New File.txt" . Replace or remove any spaces in the filename. Same goes for directory names. I also found that where the file was located made a difference. For example, if the file was in the:
c:\Documents\BaanV\Sales_Invoices directory, client2server returned an error

If I moved the file up 2 levels - to the: c:\Documents directory (or to the root directory), client2server did NOT return an error and copied the file.

The final thing is that you cannot assign the file/pathname to a variable and use this variable for the source name - as soon as you assign "c:\Documents" to a variable you get the double backslash. However, if you place the file/pathname in quotes within the client2server function, this substitution doesn't happen.

ret.val = client2server("c:\Documents\ABC_New_File.txt", destination.file.name, false, false)

agramm
18th June 2003, 17:48
Hello,

I attached an example for transfering files from server2client.
The Code is an 3GL-Script and in use as conversion programm in a printer in baan to start MS-Word on client with word-template, who converts baan-report in nice looking word-document.

Hope this will help you

Greetings andy