s = Environment.GetEnvironmentVariable("UserProfile") + "\\Pictures";
string[] photosfiles = Directory.GetFiles(t, "*.*", SearchOption.AllDirectories);
for (int i = 0; i < s.Length; i++)
{
File.Copy(photosfiles[i], tempphotos + "\\" + Path.GetFileName(photosfiles[i]), true);
}
This will copy the files from one directory to another. I want to check all the time inside the FOR loop for the destination directory size. For example first its copying one file to check the file size if its less then 50mb continue.
Next itertion in the loop after copying the second file check for the two files in the destination directory size if both files size is less then 50mb continue. And so on untill its reaching 50mb then stop the loop.