Running out of disk space
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-02-22 05:51 PM
What is the best practice to clear the logged in users temp folder. The VM are running out of disk space.
Thank you
------------------------------
Mary Culotta
------------------------------
Thank you
------------------------------
Mary Culotta
------------------------------
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-02-22 07:40 PM
Hi @Mary Culotta,
It is always advisable to reduce the number of logged in users in the VM. Do you have a huge list of users getting logged into your VMs?
------------------------------
Arika Jatwani Process Manager
------------------------------
It is always advisable to reduce the number of logged in users in the VM. Do you have a huge list of users getting logged into your VMs?
------------------------------
Arika Jatwani Process Manager
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-02-22 07:44 PM
Hi Arika,
No we do not have a large number of users on the vm's.
------------------------------
Mary Culotta
------------------------------
No we do not have a large number of users on the vm's.
------------------------------
Mary Culotta
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-02-22 05:44 PM
Hi!
Always is a good idea to have any housekeeping job for this kind of things.
In my company we defined a period time to delete old files, usually, files older than 3 months.
I think that, the best way is putting this job in an external scheduler, not in a BP Solution.
I give you some links speaking about cleaning up this kind of files:
https://www.lifewire.com/how-to-delete-temporary-files-in-windows-2624709
https://devblogs.microsoft.com/scripting/weekend-scripter-use-powershell-to-clean-out-temp-folders/
Hope this helps you!
Bye 🙂
------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------
Always is a good idea to have any housekeeping job for this kind of things.
In my company we defined a period time to delete old files, usually, files older than 3 months.
I think that, the best way is putting this job in an external scheduler, not in a BP Solution.
I give you some links speaking about cleaning up this kind of files:
https://www.lifewire.com/how-to-delete-temporary-files-in-windows-2624709
https://devblogs.microsoft.com/scripting/weekend-scripter-use-powershell-to-clean-out-temp-folders/
Hope this helps you!
Bye 🙂
------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-02-22 07:25 AM
Hi @Mary Culotta,
Below Steps can be implemented in the Action Stages (Delete Files).
1. %temp% --> This cleans the temp files of the User Profile --> Username must be selected dynamically in a data item.
2. temp --> This cleans the windows temp files. The RTR or VM must have admin rights to run this command.
Or, you can create a .bat script to add such commands and then execute using Start Process Action stage.
------------------------------
Saurabh Goswami
RPA Architect
Ericsson
------------------------------
Below Steps can be implemented in the Action Stages (Delete Files).
1. %temp% --> This cleans the temp files of the User Profile --> Username must be selected dynamically in a data item.
2. temp --> This cleans the windows temp files. The RTR or VM must have admin rights to run this command.
Or, you can create a .bat script to add such commands and then execute using Start Process Action stage.
------------------------------
Saurabh Goswami
RPA Architect
Ericsson
------------------------------
Saurabh Goswami
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-22 01:15 PM
HI Saurabh,
Can you elaborate a little more on how to accomplish what you are suggesting?
Thank you
------------------------------
Mary Culotta
------------------------------
Can you elaborate a little more on how to accomplish what you are suggesting?
Thank you
------------------------------
Mary Culotta
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-22 10:06 PM
Hi,
In my opinion, its really hard to make this only with the BP Tools and I do not recommend to put this kind of maintenance task inside a Business Process.
But... challenge accepted!
Attached to this message you have the full project that I made. Basically, import it (also need to have Utility - Collection Manipulation and Utility - File Management)
How its works? Just call the action "Housekeeping" from the object. You need to indicate the folder that you want to clean up and the number of days that you want to delete (If you put 180 its start deleting files older than Today()-180 days)
Its also delete files in subdirectories from the first path. If you open the Object you will find a page called "CleanUpFolder". In the last stage calls itself (recursively) to go inside every subfolders. (If you have some problems to understand this kind of recursive functions, tell me and I'll explain you better)
This is how the CleanUpFolder page looks like:

My own recommendation for this problem...
Use this simple command line that you can launch from CMD
Only need to change the folder that you need and the days (C:\My Folder and -30 respectively)
If you create a .bat file, you can execute this from the Task Scheduler of Windows
It's faster, it's saver and it's better
Hope this helps you to fix your problem. And if this solves the issue, remember to mark this as the best answer 🙂
Bye 🙂
------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------
In my opinion, its really hard to make this only with the BP Tools and I do not recommend to put this kind of maintenance task inside a Business Process.
But... challenge accepted!
Attached to this message you have the full project that I made. Basically, import it (also need to have Utility - Collection Manipulation and Utility - File Management)
How its works? Just call the action "Housekeeping" from the object. You need to indicate the folder that you want to clean up and the number of days that you want to delete (If you put 180 its start deleting files older than Today()-180 days)
Its also delete files in subdirectories from the first path. If you open the Object you will find a page called "CleanUpFolder". In the last stage calls itself (recursively) to go inside every subfolders. (If you have some problems to understand this kind of recursive functions, tell me and I'll explain you better)
This is how the CleanUpFolder page looks like:
My own recommendation for this problem...
Use this simple command line that you can launch from CMD
ForFiles /p "C:\My Folder" /s /d -30 /c "cmd /c del @file"
Only need to change the folder that you need and the days (C:\My Folder and -30 respectively)
If you create a .bat file, you can execute this from the Task Scheduler of Windows
It's faster, it's saver and it's better
Hope this helps you to fix your problem. And if this solves the issue, remember to mark this as the best answer 🙂
Bye 🙂
------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-02-22 02:04 PM
Hi Saurabh,
Can you explain a little more how I use the %temp%.
Thank you
------------------------------
Mary Culotta
------------------------------
Can you explain a little more how I use the %temp%.
Thank you
------------------------------
Mary Culotta
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-02-22 12:33 PM
Hi @Mary Culotta,
Sorry for the late response.. I was trying to explain as shown below for cleanup using %temp%.
Step-1: Get the Username

Step-2: Delete files by giving %temp% file path. Sometimes this step requires admin access in the VM...to properly execute this step.
You can check the same by manually doing this step first... Admin access on the VM depends on the roles you have been provided by the Infra owner.
------------------------------
Saurabh Goswami
RPA Architect
Ericsson
------------------------------
Sorry for the late response.. I was trying to explain as shown below for cleanup using %temp%.
Step-1: Get the Username
Step-2: Delete files by giving %temp% file path. Sometimes this step requires admin access in the VM...to properly execute this step.
You can check the same by manually doing this step first... Admin access on the VM depends on the roles you have been provided by the Infra owner.
------------------------------
Saurabh Goswami
RPA Architect
Ericsson
------------------------------
Saurabh Goswami
