Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Wednesday, January 16, 2019

Filename handling in X++

Hi,

Check the file existance,
System.IO.File::Exists(fileName)

Copy the file A to B
System.IO.File::Copy(fileName, FileB);

Delete the file
System.IO.File::Delete(fileName);

Get only file name from the path URL.

System.IO.Path::GetFileName(fileName);
System.IO.Path::GetFileNameWithoutExtension();
System.IO.Path::GetExtension(fileName);

Regards,

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...