Removing read-only files

Train seems unable to remove a read-only file neither with file.remove, nor with folder.remove(recursive).

Is that the limitation or bug? Is there any workaround or other way to do that?

Thanks,
Vladimir Kudelin

1 Like

execute “attrib <FILE_NAME> -r” via shell, then use file.remove. (Can you post a feature request on github for a way to do this from script?)

Done.

Thanks.

Hi Carlo,

I added a pull request.
I created File.setAttributes

cool, thanx!

Jeroen,

Will it work recursively on folder?

Vladimir Kudelin.

Hi Vladimir,

Not yet,

I will see if I can do that tonight…

I also added Folder.SetAttributes …

1 Like

thank you, Jeroen!