X++ code to Split the file name from the file path

// If the file path comes from the dialog , it automatically works ,else you need to Specify '\\'
-----------------------------------------------------------------------------------

static void RB_FileNameSplit(Args _args)
{

Filename path;
FileName fileName;
Filename name;
Filename extention;
Str str_filename;
;
fileName = "c:\\Documents and Settings\\balakrishnanr\\Desktop\\practicefile.xls";
[path, name, extention] = fileNameSplit(fileName);
if (!name)
{
str_filename = '';
}

str_filename = name + extention;

print str_filename;
Pause;

}

No comments:

Post a Comment

Install and Configure Zpl Printer on D365 F&O

  Setup Zpl Printer On D365 F&O Posted on Recently, I have had an opportunity review the possibilities to print license plates within D3...