Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating folder in Windows/Linux path in Background mode

SAPSeeker
Participant
0 Kudos

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.

5 REPLIES 5

michael_kozlowski
Active Contributor
0 Kudos

How to create folder in background is already discussed in this threat Creating folder in background | SCN

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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