Script logic changed from folder rename to create folder, move files and then delete old folder
Fix the renamed streamer issue from #1
Why change the script logic?
When I checked the code, I've seen you moved files into the same folder to another name and then finally rename the folder to the new UUID one. To fix the renamed streamer issue, I needed to create a new folder (because the VODID don't exist under the new name) to move and rename the needed files. I could create a old named folder like "123456789" and then rename the folder at the end but it was better (in my opinion) to create the new UUID one from the start.
New SHOULD_DELETE env
Since the logic was changed to create new folder, older ones are still there. I decided to not automatically delete them because it can contains files with rename errors and because I wanted to give users time to check everything is fine before fully deleting any trace of ceres. Some if statements have been added to make sure that the rename function and the VODs injection in DB don't start when deletion process is started.
Let me know of any change you want to make, since I'm not familiar with this language, I tried my best to add everything I had around my head.
Changes
Why change the script logic?
When I checked the code, I've seen you moved files into the same folder to another name and then finally rename the folder to the new UUID one. To fix the renamed streamer issue, I needed to create a new folder (because the VODID don't exist under the new name) to move and rename the needed files. I could create a old named folder like "123456789" and then rename the folder at the end but it was better (in my opinion) to create the new UUID one from the start.
New
SHOULD_DELETE
envSince the logic was changed to create new folder, older ones are still there. I decided to not automatically delete them because it can contains files with rename errors and because I wanted to give users time to check everything is fine before fully deleting any trace of ceres. Some if statements have been added to make sure that the rename function and the VODs injection in DB don't start when deletion process is started.
Let me know of any change you want to make, since I'm not familiar with this language, I tried my best to add everything I had around my head.