Hi all,
the following code compiles without error:
path:=GetCurrentFolder()+ "\"
MsgInfo(path) shows the right path, but when continuing I get a runtime error. pls see attached screen shots.
What is wrong?
Thank you
Robert
GetCurrentFolder()
Moderator: Rathinagiri
GetCurrentFolder()
- Attachments
-
- path_shown_correctly.JPG (40.56 KiB) Viewed 2269 times
-
- ERROR.JPG (37.81 KiB) Viewed 2269 times
Re: GetCurrentFolder()
Show us row 58 of the KOP_REPORT function.
It looks like it was wrong to call the COPY FILE function, for example: instead of
Syntax:
COPY FILE <xcSourceFile> TO <xcTargetFile>|<xcDevice>
Arguments:
<xcSourceFile> is the name of the source file to copy including the extension.
<xcTargetFile> is the name of the target file including the extension.
Both arguments can be specified as literal file names or as character expressions enclosed in parentheses.
It looks like it was wrong to call the COPY FILE function, for example:
Code: Select all
COPY FILE .... TO path + "asbeweg.dbf"
Code: Select all
COPY FILE .... TO (path + "asbeweg.dbf")
COPY FILE <xcSourceFile> TO <xcTargetFile>|<xcDevice>
Arguments:
<xcSourceFile> is the name of the source file to copy including the extension.
<xcTargetFile> is the name of the target file including the extension.
Both arguments can be specified as literal file names or as character expressions enclosed in parentheses.
Re: GetCurrentFolder()
THx for replying, here comes line 58:
copy file s:\as5win\daten1\asbeweg.dbf to path+"asbeweg.dbf"
These 2 lines work fine:
copy file s:\as5win\daten1\asinfo.dbf to c:\lastwe\asinfo.dbf
copy file s:\as5win\daten1\asart.dbf to c:\lastwe\asart.dbf
Robert
copy file s:\as5win\daten1\asbeweg.dbf to path+"asbeweg.dbf"
These 2 lines work fine:
copy file s:\as5win\daten1\asinfo.dbf to c:\lastwe\asinfo.dbf
copy file s:\as5win\daten1\asart.dbf to c:\lastwe\asart.dbf
Robert
Re: GetCurrentFolder()
Correct should be: or
Code: Select all
copy file s:\as5win\daten1\asbeweg.dbf to (path+"asbeweg.dbf")
Code: Select all
copy file s:\as5win\daten1\asbeweg.dbf to &(path+"asbeweg.dbf")
Re: GetCurrentFolder()
Hi edk,
is working.
Thank you very much.
Robert
is working.
Thank you very much.
Robert