Skip to Content
0

How to provide file path while using file_copy/file_move function in SAP DS 4.2 ?

May 12, 2017 at 11:16 AM

192

avatar image

I am trying to use file_copy and file_move functions which are available in SAP DS 4.2. While file_exists function works well with the file path provided, the file_copy and file_move functions throw error saying no such directory exists.

Please assist.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Nitesh Ghotiya May 12, 2017 at 11:27 AM
1

Newer versions of SAP BODS have file_copy , file_move functions which can be really painful to use. If you use a path like this ( c:\Program Files\Some Folder\YetMore Folder), these functions will not work. However, if you use a path like this ( c:/Program Files/Some Folder/YetMore Folder), functions will work.

Make use of replace_substr function to make it work -
file_copy(replace_substr($G_Quarantine_File ,'\\','/'), replace_substr ( $G_Failed_Dir,'\\','/' ), 1);

Share
10 |10000 characters needed characters left characters exceeded