Delete Read only Files with Utility File Management

sanaz.moayer

New Member
Hi,

With using Utility file management I could delete all files except Read Only files.
Do you know how can delete "Read Only" files?

Many thanks for your help in advance.
 

sivagelli

Well-Known Member
hello,

To delete files which are read-only, i suppose you have to change the file attribute to not ReadOnly before deleting. A command line can help. Create a batch file with below statement -
attrib -r
and save the file to the directory where the read only files are present.
Now use Utility Environment, "Start Process" action and run the batch file with
Application=cmd.exe
Arguments = "/c C:/.../removeReadOnly.bat" (the file path with prefix of /c)
Execute this action will remove the Read-only attribute of all the files in the directory. Now, you may create another action using Utility - File Management, Delete Files action to delete the files.

Thanks!
 

sanaz.moayer

New Member
hello,

To delete files which are read-only, i suppose you have to change the file attribute to not ReadOnly before deleting. A command line can help. Create a batch file with below statement -
attrib -r
and save the file to the directory where the read only files are present.
Now use Utility Environment, "Start Process" action and run the batch file with
Application=cmd.exe
Arguments = "/c C:/.../removeReadOnly.bat" (the file path with prefix of /c)
Execute this action will remove the Read-only attribute of all the files in the directory. Now, you may create another action using Utility - File Management, Delete Files action to delete the files.

Thanks!

Many thanks for your help!
 

VJR

Well-Known Member
Hi,

With using Utility file management I could delete all files except Read Only files.
Do you know how can delete "Read Only" files?

Many thanks for your help in advance.
Hi sanaz.moayer,

What type of files are they (.xls, .txt etc) and why are they read-only?
Are they read-only because they are open with someone?
When you delete any of those read-only files manually what is the message you get?
 

sanaz.moayer

New Member
Hi sanaz.moayer,

What type of files are they (.xls, .txt etc) and why are they read-only?
Are they read-only because they are open with someone?
When you delete any of those read-only files manually what is the message you get?

Hi,
These Files are .tmp. I can delete them manually, but they can not be deleted in Blue Prism process (with Utility File Management- Delete Files).

Regards
Sanaz
 
Top