Hi All,

When i run the below code in windows i am getting "The system cannot find the path specified" even though the path exist , the length of the path is 516 as below, request your help.

Path :
N:\PROD_TEAM\TST_BACKUP\abcyf0\TST_BATS\j2ee_backup\cluster\states0\apps\bat.com\tc~bat~agent~application~e2emai~std~collectors\servlet_jsp\tc~bat~agent~application~e2emai~std~collectors\root\WEB-INF\entities\DataCollectionPushFileContentScannerTypeBuilder

Program:
void SizeDirList (string[] SzDNDlst)
{
 auto logF = File(LFpath, "a");
 ulong subdirTotal = 0;
 foreach (string i; SzDNDlst[0 .. $])
     {
auto dFiles = dirEntries(i, SpanMode.shallow).filter!(a => a.isDir && !globMatch(a.baseName, "*DND*")).array;
          foreach (d; dFiles)
                {
                                auto SdFiles = dirEntries(d, 
SpanMode.breadth).array;
                                foreach (f; SdFiles)
                                        {
                                                subdirTotal += f.size;
                                        }
                                   ulong subdirTotalGB = 
(subdirTotal/1024/1024/1024);
                       if (subdirTotalGB > SizeDir)
                                    {
                                writefln("%-63s %s", d, subdirTotalGB);
                                        }
                                                subdirTotal = 0;
                    }   
         }
}

From,
Vino.B

Reply via email to