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

Get a table ID in SQL - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' Regards,