-4

I have a test case to automate, where in I need to change the folder's permission to read only from Python script. I am using Test Complete tool with python scripting for automating the manual tests.

I am not able to accomplish the tasks, I tried Googling but no luck.

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
  • 1
    @DYZ, your google is illegal)) – Aksen P Nov 12 '19 at 07:32
  • 1
    _I tried googling but no luck._ --> So you already have some code that you tried but that code failed? Please [edit] your question and show us your code and the exception that you got. – Ocaso Protal Nov 12 '19 at 07:38

1 Answers1

0

you can try this line of code.

import os, stat

os.chmod(ur"file_path_name", stat.S_IREAD)