‎2016 Mar 31 7:27 PM
Hello Expert's,
I have a requirement to create a folder/directory in a shared path through background mode. This should work for both Windows and Linux environment, where our ECC servers resides in both type of servers.
Can someone guide me with any Code/BAPI's/Function Modules for achieving this ?
Thanks and Regards,
Gaurav.
‎2016 Apr 01 10:45 AM
How to create folder in background is already discussed in this threat Creating folder in background | SCN
‎2016 Apr 01 4:59 PM
Thanks Michael.
I got code for creating folder in Unix/Linux environment. But still unable to get a clear picture on creating folders through Windows environment.
‎2016 Apr 04 8:20 AM
Hi Gaurav,
the mechanism mentioned by Michael works under Windows and Unix. (You may just have to figure out, on which platform you are running, and then use different commands as needed.)
Best Regards, Ulrich
‎2016 Apr 06 6:07 PM
Hello Ulrich,
Below code is working fine for creating folder in Unix/Linux environment. But not sure how to do that in Windows environment. Can you please explain how to achieve it ?
| lv_command(9) | = 'mkdir -p '. | |
| lv_command+9(55) = lv_pathextern. |
| CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command. |
Thanks,
Gaurav.
‎2016 Apr 07 8:18 AM
Hi Gaurav,
'-p' is not supported on Windows (and not necessary, as the Windows mkdir command already creates non-existing parent directories automatically).
So just use 'mkdir '.
Best Regards, Ulrich