I have a script that is moving / renaming files and folders but I can't test it because Studio and WinBatch are locking the folders I want to remove. See attached.
Again insufficient information to give a definitive answer but there are several conditions that cause the OS to lock a file or directory for a process. One common cause is that a directory is the process's CWD.
Always something more to learn. I always thought it was the programs themselves locking a folder.