I have created a python script in Google colab that copies and renames a couple of jpg file as well as creating an xml file. It works fine apart from the fact that the jpg files need to be renamed with a pipe '|' towards the end e.g. 1211415|1.jpg. In colab I can see the created files and they seem to be named as expected, but I am auto copying and downloading them with ..
shutil.copy('imageOne.jpg', imageZeroName)
shutil.copy('imageTwo.jpg', imageOneName)
files.download(imageZeroName)
files.download(imageOneName)
They then appear in my downloaded folder as 1211414_1.jpg. The pipe has been replaced by an underscore.
I noticed that the original files could not be located when they had pipes in the name. So I changed the names to imageOne.jpg and imageTwo.jpg i.e. I was using a sample with the correct naming convention like 589946681l0.jpg and received error like file does not exist.
Why is this happening and is there anyway to prevent it from doing this?
Thanks.