added recursive file reading using --recursive flag.

added a feature to scan subdirectory and organize the file structure
even further.
This commit is contained in:
2025-12-29 18:47:50 +05:30
parent 09828ee2f5
commit 6df8af91bb
6 changed files with 187 additions and 352 deletions

View File

@@ -22,6 +22,8 @@ struct Args {
help = "Maximum concurrent API requests"
)]
max_concurrent: usize,
#[arg(long, help = "Recursively searches files in subdirectory")]
recursive: bool,
}
#[tokio::main]
@@ -37,7 +39,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
cache.cleanup_old_entries(7 * 24 * 60 * 60);
let batch = FileBatch::from_path(download_path.clone());
let batch = FileBatch::from_path(download_path.clone(), args.recursive);
if batch.filenames.is_empty() {
println!("{}", "No files found to organize!".yellow());