Tuesday 17 December 2019

How to get python to copy files to desktop

How do I make python copy a jpeg to the desktop?



import shutil
src = ('1.3.jpg')
dst = ('tEST/nicholas')
count = 1
while count < 10000000000:
shutil.copyfile(src, dst + str(count) + ".jpg")

count += 1


This is what I have so far but I want to change the dst folder into the desktop I'm using windows 7

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...