Like I mentioned before, you can choose an external drive, a shared folder, a network. Go ahead and click on the Change button and choose a new location. Now scroll down more until you get to the Downloads section. Then scroll down to the bottom and click on Advanced. Better to move this additional code to a function. First, click on the three dots icon at the top right and click on Settings. To make the code stable you might need to add some exceptions handling. Print(full_path+' is moved to '+full_new_path) If (timestamp_now - timestamp_file) < 15:įull_new_path = os.path.join(new_path, new_filename) # if time delta is less than 15 seconds move this file Timestamp_file = os.path.getmtime(full_path) # time of file creation # Now go through the files in download directoryįor (dirpath, dirnames, filenames) in os.walk(download_path):įull_path = os.path.join(download_path, filename) New_filename = 'new_name.pdf' # Set the name of file New_path = r'C:\Users\Oli\Google Drive' # Path where to move fileĬhrome_options = webdriver.ChromeOptions()Ĭhrome_options.add_experimental_option('prefs', profile)Ĭhrome_options.add_argument('-kiosk-printing')ĭriver = webdriver.Chrome(chrome_options=chrome_options) Like: chrome_options.add_experimental_option("prefs", ĭownload_path = r'C:\Users\Oli\Downloads' # Path where browser save files Method 2: change the default download location via Windows Settings. And here are two methods: Method 1: change the default download location via Documents Properties. fault_directory could be added not to appState but to "prefs" of add_experimental_option If your drives are running out of space, it is a good idea to change the location where files save to free up space.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |