Move description to README.md
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2022-06-01 00:47:06 +02:00
parent 714d5040b5
commit 1c43ac028d
2 changed files with 16 additions and 12 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Info
This simple and inefficient program was made to rename files in a folder that were numbered incorrectly. The files had the correct number in their name, but since most OSes use alphabetical order, it was not like this:
```text
1, 2, 3, 4, 5, 6, 7, 8, 9, 10...
```
but like this:
```text
1, 10, 11, 12-19, 100, 101, 102... 2, 20, 21-29, 200, 201, 202...
```
This is easily fixed by adding zeros before the actual number, up to the number of needed digits:
```text
001, 002, 003, 004... 010, 011... 020, 021... 100, 101...
```
The code only supports up to 3 digits but can easily be updated to handle more.

View File

@ -7,19 +7,8 @@ import java.util.stream.Stream;
public class Renamer
{
/*
this simple and inefficient program was made to rename files in a folder that were numbered incorrectly.
the files had the correct number in their name, but since most OSes use alphabetical order, it was not like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10...
but like this:
1, 10, 11, 12-19, 100, 101, 102... 2, 20, 21-29, 200, 201, 202...
this is easily fixed by adding zeros before the actual number, up to the number of needed digits:
001, 002, 003, 004... 010, 011... 020, 021... 100, 101...
*/
public static String path = "D:\\CD 2021\\foto";
public static String path = "D:\\path\\to\\directory";
public static void main(String[]args)
{