2014 Jul 16 3:27 PM
Hy folks i'm been reading many topics about creating and deleting a folder ( entire folder) from application file.
i successufuly create a file by using command and SM69 cmd /c mkdir,
and that's ok, what i'm unable to do is to delete a directory.
witch command should i use?
is it all possible to zip a folder?
Regards.
2014 Jul 16 6:07 PM
Hi,
you have to delete all files in your directory before deleting the directory. Otherwise, it is not possible.
The command is: rmdir -p
CALL 'SYSTEM' ID 'COMMAND' FIELD 'rmdir -p'
ID 'TAB' FIELD tabl-*sys*
.
Afterwards, to Zip a folder, refer to the class CL_ABAP_ZIP.
Rachid.
2014 Jul 16 4:56 PM
Hi Marco
If you are going to use commands please search about them
it depends of your OS
as i see it looks like windows(because of mkdir) so you must use rmdir
you will find on google a lot of information about this command
regards
MC
2014 Jul 16 5:42 PM
Marco,
it's possible to create a command,
regarding your operational system (windows, linux),
using sm49 transaction.
After this use the function module SXPG_COMMAND_EXECUTE
to execute the command.
2014 Jul 16 6:07 PM
Hi,
you have to delete all files in your directory before deleting the directory. Otherwise, it is not possible.
The command is: rmdir -p
CALL 'SYSTEM' ID 'COMMAND' FIELD 'rmdir -p'
ID 'TAB' FIELD tabl-*sys*
.
Afterwards, to Zip a folder, refer to the class CL_ABAP_ZIP.
Rachid.
2014 Jul 21 4:02 PM
hello i solved by using the
cmd /c rmdir /Q /S
this allow to delete a non empty directory.