Skip links

Ax ile belli bir klasordeki dosya ve klasorleri bulan metod


Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118
Ax ile belli bir klasordeki dosya ve klasorleri bulan metod

Merhaba
Ax ile belli bir konumdaki klasor ve dosyaları taramam gerekti. Bunun için farklı yöntemler kullanabilirsiniz. Ben Muammer arkadaşımın yardığıyla aşşağıdaki metodu yazdım. İşinize yarayabilir.
[code lang=”js”]
static void DosyaTarama(Args _args)
{
FilePath    filePath;
InteropPermission permission;
int  i,j,maxx,  maxlenght;
System.String[] strFileList;
System.String[] strDrList;
System.String   strDrLis;
;
filePath = strfmt(“C:\\fd”); // herhangi bir yol olabilir
//ama  yetkilerine dikkat etmek lazım
permission = new InteropPermission(InteropKind::ClrInterop);
permission.assert();
strDrList = System.IO.Directory::GetDirectories(filePath);
maxlenght =  strDrList.get_Length();
for(i = 0 ; i < maxlenght; i++  )
{
info(strDrList.GetValue(i));
strDrLis       = strDrList.GetValue(i);
strFileList  = System.IO.Directory::GetFiles(strDrLis);
maxx           =  strFileList.get_Length();
for(j = 0 ; j < maxx; j++  )
{
info(strFileList.GetValue(j));
}
}
}
[/code]
Selamlar.

Join the Discussion