Long File path Exception:The system cannot find the path specified
Vino.B via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Aug 22 22:06:50 PDT 2017
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
More information about the Digitalmars-d-learn
mailing list