Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
3 votes
1 answer
105 views

I was working with shutil module. My file structure looked like this projects/backend/--3-5 repos-- . In one of the repo's views.py I used for d in destDirs: shutil.rmtree(d, ignore_errors=True) ...
2 votes
2 answers
80 views

I'm writing a Python script that: Notes all files in the working directory Reads the artist tag with the mutagen library Uses regex to grab the first-mentioned artist as the 'main artist' Creates a ...
3 votes
3 answers
128 views

I have a task to download around 16K+ ( max size is of 1GB) files from given URL to location. Files are of different format like pdf, ppt, doc, docx, zip, jpg, iso etc. So had written below piece of ...
1 vote
1 answer
68 views

I want to have a folder called 'product_a1' in a folder called 'product_a1' with a text file and process flag files such as 'completed' file. I want to zip the entire thing so it can be put onto a ...
0 votes
1 answer
574 views

On MacOS I am looping through the source folder of pdf's and checking the destination folder if the there is an existing subfolder with the same name as the file. I am encountering a problem when I ...
MiraM's user avatar
  • 11
0 votes
0 answers
39 views

We are using shutil.make_archive to zip a directory. This is being done in a pod (docker container) in Kubernetes. Sometimes the pod crashes when the directory is being zipped. The pod is showing an ...
1 vote
1 answer
114 views

I'm trying to write a script for which I want to copy a git repository, but without the .git folder. Here is my entire code: import shutil shutil.copytree([src], [dst], ignore=shutil.ignore_patterns('*...
0 votes
0 answers
212 views

I am using pypdfium2 to read text from a PDF and then later move it to a different folder, but I am getting the same error telling me that it is open and can't be moved. How do I properly close the ...
Jacob's user avatar
  • 1
-2 votes
1 answer
80 views

I currently have a folder full of epubs that I would like to read, a folder of epubs I've already read and would like to read again, and a corresponding file with the names of the epub files in each. ...
0 votes
1 answer
70 views

I made a crude auto-updating application using python, and made exe file using freeze-cx. First, the app check whether a file of newest version is available on the firebase server, and download the ...
0 votes
3 answers
2k views

I'm making a simple code with the shutil module of copying another contents of a file and had a FileNotFound error, which I want to use the file name instead of pasting the file path every single time....
0 votes
1 answer
126 views

When I try to copy file in new path with shutil like this: shutil.copy("data/Обзор кассационной практики Судебной коллегии по уголовным делам Верховного Суда Российской Федерации за первое ...
0 votes
1 answer
151 views

I have a script running that at a certain stage has to move a lot of files from an internal drive to a network drive using: for filename in os.listdir(finished_folder): source_file_path = os.path....
Shodan's user avatar
  • 21
0 votes
1 answer
135 views

On GitHub I share an PyInstaller generated exe-File (file1.exe). The idea is an automatized update process if there is a new version of the file. On every start of file1.exe the program checks if ...
Fab's user avatar
  • 11
-1 votes
1 answer
145 views

def tdata_move(): number_of_acc = len([file for file in os.scandir(fr"D:\tdata for accs")]) for item in range(0, number_of_acc): for folder in os.listdir(r"D:\tdata for ...

15 30 50 per page
1
2 3 4 5
...
80

AltStyle によって変換されたページ (->オリジナル) /