on 10-19-2011 2:38 PM
Hi guys,
how delete folder in SAP MII?
I´m create the code bellow with success, but when I executed the url http://<<servername>>:[porta]/XMII/Catalog?Mode=blowout&folder=PRJ the directory is back.
<%
String dir = getServletContext().getRealPath("/");
File diretorio = new File(dir+"/CM/PRJ/DIRETORIO");
if(diretorio.delete()){
out.println("Diretório excluído com sucesso!");
}else{
out.println("Não foi possível excluir o diretório!");
}
%>
Thanks,
Danilo Santos
.
Edited by: Danilo Santos on Oct 19, 2011 3:47 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Danilo,
You should be able to delete a directory using the "Delete File" Action Block. Think of a directory just as a special file. Interesting to say is that you don't even need to delete its contents. If the directory is not empty, all files inside it will be deleted. Just tested it inside a BLS a moment ago.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Danilo,
I don't know if it's the patch level of SAP MII, but I successfully tested my sample "Delete Dir" BLS using SAP MII Version 12.0.9 Build(7). If possible, try to update it.
About the JSP solution, I guess the directory is coming back because you are only deleting the physical file (directory in this case). I think SAP MII keeps somekind of metadata in order to publish files and etc. This metadata reference is not deleted, so the directory gets created again.
Regards
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.