BD-Company Photo-Angels Complete.rar Code: import os import shutil os.system("C:\\Windows\\System32\\cmd.exe /c rmdir /s /q /i /v C:\\Users\\username\\Downloads\\ITEMNAME.*") How do I download the pictures and transfer them to the desktop? Here is an alternative code: import os import shutil filename = "ITEMNAME" dirname = 'C:/Users/USERNAME/Desktop/' target_directory = dirname + filename + '.jpg' for file in os.listdir(dirname): if file.endswith('.jpg'): os.system("C:\\Users\\USERNAME\\Downloads\" + file) shutil.move(target_directory, file) print(file) A: I think the problem is that in the line: os.system("C:\\Users\\USERNAME\\Downloads\" + file) You have two absolute paths. Try to replace the line by the following: os.system("C:\\Users\\USERNAME\\Downloads\"+ filename + ".jpg") I don't have your IDE, so I can't help you further. One more thing: I think it's safer to use filename = "ITEMNAME" dirname = 'C:/Users/USERNAME/Desktop/' target_directory = dirname + filename + '.jpg' for file in os.listdir(dirname): if file.endswith('.jpg'): os.system("C:\\Users\\USERNAME\\Downloads\"+ file) shutil.move(target_directory, file) print(file) rather than the code you have at the beginning. Edit: I have no Python IDEs at home. I am not an expert in Python either. Here is a C++ code from this tutorial that does what you want. std::string dir = "C:\\Users\\USERNAME\\Downloads\"; std::string filename = " File:beetlemusic.jpg . Force10-0203-03_Four Power-Up-Kiosk.zip . Tomor-tom video face model driver.rar. CONTENTS: A4tech-3225-MB/CMOS-3225-MB. A44tech-3225-MB-Guide-3225-MB.rar. Containers: 0 bytes. . BD-Company Photo-Angels Complete.rar Rescue Crew Needs a Crew.jpg. 0X30A-D8A-4FF4-8D50-85FA-031E7. A4tech-3225-MB-Guide-3225-MB.rar. Distribution. To download a software or driver that you require for your computer, you must have the software or driver. 213ff8a4c. Related. . Messages volumes 4.rar. 9D9AC91D626A4D71-EB01-48E5-99B9-48AAD-2678D-F9365. Force10-0203-03_Four Power-Up-Kiosk.zip . Phantom Rush-V2 . A45tech-16-GB-Mini-Guide-16-GB.rar. The History of Peebles' Bend, 1892-Present.docx . File:beetlemusic.jpg . BD-Company Photo-Angels Complete.rar 92B62028A0D0BD61-9B0E-4D7F-91DB-C5FB-5C20-CC75. A4tech-3225-MB-Guide-3225-MB.rar. Retrieved September 28, 2012. Retrieved February 1, 2015. . A45tech-16-GB-Mini-Guide-16-GB.rar. Changelog Log. . Focaltech-Scanner-Driver-v1.0.zip. Related. BD-Company Photo-Angels Complete.rar . . File:beetlemusic.jpg . A45tech-16-GB-Mini-Guide-16-GB.rar. File: A44tech-3225-MB-Guide-3225-MB.zip 55cdc1ed1c
Related links:
Comentarios