How to find file type either .XLSX or .CSV AX 2012

static void fileType(Args _args)
{
    Filename filepath;
    Filename filename;
    Filename fileType;
    str fileNameString,fileNamePath;
 
    fileNamePath=@"D:\Sreekanth\3729\Hour rate2.csv";
    [filepath, filename, fileType] = fileNameSplit(fileNamePath);
    fileNameString= filename + fileType;
    info(strFmt("filename=%1 \nfileType=%2",filename,fileType));
}

Comments

Popular posts from this blog

Create RFQ through X++

Base enum values in Dynamics 365

Project Id through X++ code