MrPig91 / PSChiaPlotter

A repo for powershell module that helps Chia Plotting
MIT License
181 stars 47 forks source link

Suggestion: Delete Temp files when Stop-Process ID #28

Closed goyetus closed 3 years ago

goyetus commented 3 years ago

Stop-Process is wonderfull , but it leaves a lot of files in the TEMP drive , that can cause fails with the next plots cause to decreased space.

Any way to delete files when you kill a process? (I know it´s not an easy task)

Regards!!!

MrPig91 commented 3 years ago

Yes! I the temp files have the plot id in the file names so you can have it automatically delete those files if the process has an exit code other than 0.

goyetus commented 3 years ago

Cant find the Plot Id in the code......
Will search better :)

Regards

MrPig91 commented 3 years ago

Hello! I had added this to my code and so cancelled chia plotting processes should automatically delete the temp files. I made a YouTube video explaining how this is done in cases you want to experiment with it in your own scripts. https://www.youtube.com/watch?v=FF_AgB04Ccg