web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

AX 2012: File existance check

Faisal Fareed Profile Picture Faisal Fareed 10,796 User Group Leader
Multiple ways to check file existance in AX 2012;

Client side check, does not work with batch job

WinAPI::fileExists(_fileName);

Server side check which works for run base batch too

public booleangetFileExists(filepath _fileName)
{
   System.IO.FileInfo   fileInfo;
   newInteropPermission(InteropKind::ClrInterop).assert();
   fileInfo = newSystem.IO.FileInfo(_fileName);
   return fileInfo.get_Exists();

}

This was originally posted here.

Comments

*This post is locked for comments