{"id":8124,"date":"2024-11-10T16:54:53","date_gmt":"2024-11-10T14:54:53","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=8124"},"modified":"2026-01-02T11:18:40","modified_gmt":"2026-01-02T09:18:40","slug":"purger-un-dossier-specifique-tous-les-jours","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/purger-un-dossier-specifique-tous-les-jours","title":{"rendered":"Purge a specific file every day"},"content":{"rendered":"<h2>My goal<\/h2>\r\n<p>I noticed that a large number of files load my computer unnecessarily.<\/p>\r\n<p>Files I download to view a doc, read an article or other, software loads that leave their installation EXE file and other \u2026<\/p>\r\n<p>I would like to oblige myself to use a temporary folder and have it purged every day if the files are more than 2 days old.<!--more--><\/p>\r\n<h2>I use a dedicated disk T:<\/h2>\r\n<p>I chose to partition a T-disk: (for temporary) and I will use it as a target folder for downloads or others.<\/p>\r\n<p>I'll know this file is temporary.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8125\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp1.png\" alt=\"\" width=\"232\" height=\"113\" \/><\/p>\r\n<h2>I will use the Task Planner<\/h2>\r\n<p>Integrated with Windows, this tool is often forgotten while it is very practical.<\/p>\r\n<p>I launch it and will create a new task.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8126\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp2.png\" alt=\"\" width=\"249\" height=\"60\" \/><\/p>\r\n<p>To make it simpler, I add a task folder to store it, but it is not mandatory.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8127\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp3.png\" alt=\"\" width=\"299\" height=\"262\" \/><\/p>\r\n<p>With Create a Basic Task, there is a wizard that launches.<\/p>\r\n<p>I add a task that runs at 8pm every day and run the following command:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8128\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp4.png\" alt=\"\" width=\"251\" height=\"28\" \/><\/p>\r\n<p>To do this, it is necessary to configure as follows:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8129\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp5.png\" alt=\"\" width=\"469\" height=\"221\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp5.png 469w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/temp5-300x141.png 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/p>\r\n<p>so the program forfiles and in parameters\u00a0<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\">\/P \"T:\" \/S \/D -2 \/C \"cmd \/c del @path\"<\/pre>\r\n<p>You can test the launch by putting old files in this folder and running it.<\/p>\r\n<p>\u00a0<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>My goal I noticed that a significant number of files come to load my computer unnecessarily. The files that I download to view a doc, read an article or other, the software uploads that leave their EXE file of instaltion and others... I would like to oblige myself to use a temporary folder and that this one is purged all [...]<\/p>","protected":false},"author":1,"featured_media":8132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,166],"tags":[],"class_list":["post-8124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-retex"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/8124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=8124"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/8124\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/8132"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=8124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=8124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=8124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}