Skip to content
C

Bulk File Renamer

Easypython

Create a set of files, then rename all of them by adding a sequential number prefix (e.g. 1_photo.jpg, 2_photo.jpg), matching the notes' own renaming pattern.

Approach: the script creates its own files first (since a fresh judge run has no pre-existing folder to work with), then loops over them in a fixed, sorted order, using os.path.splitext() to preserve each file's extension while renaming.

Input: One line: how many files to create and rename, n.

Output: One line: the resulting file names in the folder, sorted, printed as a Python list.

Input (stdin)

Output

Run your code to see output here...