Top "Filenames" questions

Filenames are metadata about a file; a string used to uniquely identify a file stored on the file system of a computer.

How to get folder name, in which given file resides, from pathlib.path?

Is there something similar to os.path.dirname(path), but in pathlib?

python filenames pathlib
Create (sane/safe) filename from any (unsafe) string

I want to create a sane/safe filename (i.e. somewhat readable, no "strange" characters, etc.) from some random Unicode …

python cocoa filenames pyobjc
Are there any invalid linux filenames?

If I wanted to create a string which is guaranteed not to represent a filename, I could put one of …

windows linux file filesystems filenames
Bash extracting file basename from long path

In bash I am trying to glob a list of files from a directory to give as input to a …

bash filenames glob
How to get pdf filename with Python requests?

I'm using the Python requests lib to get a PDF file from the web. This works fine, but I now …

python pdf python-requests filenames
Association between naming classes and naming their files in python (convention?)

In python (and some other languages) I have learned, that the name of a class should be written in small …

python naming-conventions filenames classname
Is there a cross-platform Java method to remove filename special chars?

I'm making a cross-platform application that renames files based on data retrieved online. I'd like to sanitize the Strings I …

java cross-platform filesystems filenames
How do you import a file in python with spaces in the name?

Do I have to take out all the spaces in the file name to import it, or is there some …

python import filenames spaces
Convert DateTime.Now to a valid Windows filename

I have had this issue quite a few times and have just been using a workaround but thought I would …

c# windows filenames
Convert a filename to a file:// URL

In WeasyPrint’s public API I accept filenames (among other types) for the HTML inputs. Any filename that works with …

python url filenames