I was trying to write a code so that I could log the error messages. I am trying to name the file with the date and would like to create a new log file for each day. After g
Some possible reasons:
The first situation could be solved by checking under which account the process is running and verifying that the account has the appropriate rights.
The other situation can be solved by checking if any other process is locking the file (e.g. use tools like 'WhosLocking' or 'ProcessExplorer'