The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] delete all files in one folder
Dear Data-Miners,
I working on a clsuter process to identify if a product belongs to a cluster or to another. While the process is running, it creates one model per cluster-basket and save it in a seperate folder "cluster models". Normaly it overwrite the old models if I run the process again. But often I try other basket-counts and when i change it e.g. from 100 to 50 it just overwirte the first 50 models. When the next process iterate over the "cluster models"-folder, it find the old models (51-100) too and try to predict with them.
So I want to clean up the folder in my repository by a process before it creats the new models. I thought it would be easy to do so, but its dosnt work.
My process just delete one file per run (or nothing) and the RMiner sometimes throw an exception. Maybe you can help me
I working on a clsuter process to identify if a product belongs to a cluster or to another. While the process is running, it creates one model per cluster-basket and save it in a seperate folder "cluster models". Normaly it overwrite the old models if I run the process again. But often I try other basket-counts and when i change it e.g. from 100 to 50 it just overwirte the first 50 models. When the next process iterate over the "cluster models"-folder, it find the old models (51-100) too and try to predict with them.
So I want to clean up the folder in my repository by a process before it creats the new models. I thought it would be easy to do so, but its dosnt work.
My process just delete one file per run (or nothing) and the RMiner sometimes throw an exception. Maybe you can help me
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="loop_repository" compatibility="5.3.005" expanded="true" height="76" name="Delete Old Models" width="90" x="313" y="30">
<parameter key="repository_folder" value="cluster modell/"/>
<parameter key="entry_type" value="IOObject"/>
<process expanded="true">
<operator activated="true" class="delete_file" compatibility="5.3.005" expanded="true" height="76" name="Delete File" width="90" x="313" y="30">
<parameter key="file" value="cluster modell/%{entry_name}"/>
</operator>
<connect from_port="in 1" to_op="Delete File" to_port="through 1"/>
<connect from_op="Delete File" from_port="through 1" to_port="out 1"/>
<portSpacing port="source_repository object" spacing="0"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<connect from_op="Delete Old Models" from_port="out 1" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
0
Answers
When deleting the complete folder, you could even remove the Loop operator.
Best regards,
Marius
Thanks
Sticker
Best regards,
Marius