F
F
fright0022022-03-05 02:21:57
Python
fright002, 2022-03-05 02:21:57

How to save multiple files in a folder?

img = pag.screenshot()
path = os.path.join(r'C:\Users\#\Desktop\Aitvaro bot demo\ScreenshotList', 'test.jpg')
img.save(path)

This code saves a jpg file called test.jpg to a folder, but when the code is run again, nothing is saved to the folder, and there is still one file test.jpg in it.
How to make it so that every time you run the code, a new screenshot with a different name is saved to the folder?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question