Count all files
This commit is contained in:
parent
23f8158ebf
commit
2a8bf7e8fe
@ -5,7 +5,7 @@
|
|||||||
Console.WriteLine("Starting the checksum process.");
|
Console.WriteLine("Starting the checksum process.");
|
||||||
Console.ResetColor();
|
Console.ResetColor();
|
||||||
|
|
||||||
chksum.doTheThing();
|
Chksum.doTheThing();
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
Console.WriteLine("Checksum process finished");
|
Console.WriteLine("Checksum process finished");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Check if any file is in there
|
// Check if any file is in there
|
||||||
// If there is a file. Calculate md5sum > filename.md5
|
// If there is a file. Calculate md5sum > filename.md5
|
||||||
// If there is no file. Repeat
|
// If there is no file. Repeat
|
||||||
public class chksum {
|
public class Chksum {
|
||||||
|
|
||||||
// int getDirectoryCount() {
|
// int getDirectoryCount() {
|
||||||
// int folderCount = Directory.GetDirectories(Directory.GetCurrentDirectory()).Length; // Get folder count in current directory
|
// int folderCount = Directory.GetDirectories(Directory.GetCurrentDirectory()).Length; // Get folder count in current directory
|
||||||
@ -47,4 +47,10 @@ public class chksum {
|
|||||||
doTheThing();
|
doTheThing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getTotalFileCount() {
|
||||||
|
int totalFileCount = Directory.GetFiles(Directory.GetCurrentDirectory(), "*", SearchOption.AllDirectories).Length;
|
||||||
|
return totalFileCount - 1; // Remove the program from the totalFileCount
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user