Langsung ke konten utama

Postingan

Menampilkan postingan dari Februari, 2017

Get List File from Folder on Microsoft Dynamics AX 2012 using X++

This code show how to get List of File from Folder and Subfolder static void GetFilesInFoldersAndSubFolders(Args _args) {     System.String[] filePaths = System.IO.Directory::GetFiles(@" folder location ", "*.*", System.IO.SearchOption::AllDirectories); //get listing of all files within the folder     int fileCount = filepaths.get_Length(); //get how many files were found     int currentFileCount;          //go throw each one of the files that were found     for(currentFileCount = 0; currentFileCount < fileCount ; ++currentFileCount)     {         info(filepaths.GetValue(currentFileCount));      } }