Skip to content

Commit 94f2384

Browse files
committed
updated readme
1 parent c69a4cb commit 94f2384

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

OrganizeIt.Cli/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ public static void Main(string[] args)
1010
.WithParsed<Options>(o =>
1111
{
1212
Console.WriteLine("Welcome to the OrganizeIt.Cli!");
13-
Configs? configs = new Configs();
14-
if (string.IsNullOrEmpty(o.Directory) || o.Directory.Equals("."))
15-
{
16-
o.Directory = Environment.CurrentDirectory;
17-
}
18-
Console.WriteLine("Directory to organize: " + o.Directory);
1913
FileInfo? configFile = GetConfigFile(o.Config);
2014
if (configFile == null)
2115
{
2216
Console.WriteLine("Cannot proceed without a valid configuration file.");
2317
Console.ReadKey();
2418
return;
2519
}
20+
Configs? configs = new Configs();
21+
if (string.IsNullOrEmpty(o.Directory) || o.Directory.Equals("."))
22+
{
23+
o.Directory = Environment.CurrentDirectory;
24+
}
25+
Console.WriteLine("Directory to organize: " + o.Directory);
2626
configs = configs.GetConfigs(configFile);
2727
int result = Organizer.Organize(o.Directory, configs);
2828
if (result >= 1) Console.WriteLine("Organizer ran successfully!"); else Console.WriteLine("Organizer failed");

Readme.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,35 @@ OrganizeIt is an open-source project designed to help you organize and manage yo
77
- **Automatic File Sorting**: Automatically sort files into folders based on file type or custom rules.
88
- **Batch Renaming**: Rename multiple files at once using customizable patterns.
99
- **File Filtering**: Filter files by type, size, date, and other attributes.
10-
- **Custom Rules**: Create and apply custom rules for organizing files.
1110
- **User-Friendly Interface**: Easy-to-use interface for managing your files.
11+
- **Custom Rules**: Create and apply custom rules for organizing files.
12+
13+
By default, a default config.json ships with the program [config](https://github.com/Toyin5/OrganizeIt/blob/main/OrganizeIt.Cli/config.json) which is a basic config.
14+
config.json follows this structure:
15+
```json
16+
{
17+
"Configurations": [
18+
{
19+
"DirectoryName": "Your preferred folder name",
20+
"Extensions": [".pdf", ".docx", ".txt"]
21+
},
22+
{
23+
"DirectoryName": "Your preferred folder name",
24+
"Extensions": [".jpg", ".png", ".gif"]
25+
},
26+
{
27+
"DirectoryName": "Videos",
28+
"Extensions": [".mp4", ".avi"]
29+
},
30+
{
31+
"DirectoryName": "Applications",
32+
"Extensions": [".exe", ".msi"]
33+
}
34+
]
35+
}
36+
```
37+
38+
The app currently supports organization by extensions. I'm working on making it more flexible
1239

1340
## Installation
1441

0 commit comments

Comments
 (0)