Skip to main content

Next consecutive filename in folder

Project description

Next consecutive filename in folder

# Tested with:
# Python 3.9.13
# Windows 10

$pip install get-consecutive-filename

from get_consecutive_filename import get_free_filename
# What is it for?
# You have a folder "F:\testfiles" with 2 files "00000.txt", "00001.txt"
# and you want to get the next consecutive filename.

fname = get_free_filename(folder="f:\\testfiles", fileextension=".txt", leadingzeros=5)
print(fname)
# f:\testfiles\00002.txt
	

Project details


Release history Release notifications | RSS feed

This version

0.10

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

get_consecutive_filename-0.10.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

get_consecutive_filename-0.10-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page