Move description to README.md
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
714d5040b5
commit
1c43ac028d
15
README.md
Normal file
15
README.md
Normal 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.
|
@ -8,18 +8,7 @@ import java.util.stream.Stream;
|
|||||||
public class Renamer
|
public class Renamer
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
public static String path = "D:\\path\\to\\directory";
|
||||||
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 void main(String[]args)
|
public static void main(String[]args)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user