Delete Files > 99 Chars from NAV

Nokio
Nokio Member Posts: 52
Hi Togehter,
I've got a problem, maybe someone had already the same one and have a solution for it.
If you want to find / copy / delete a file in the windows files system out of nav then you can do it with the internal table "File".
Unfortunately the Field "Name" supports only Filenames with max. 99 chars! The same for the field "Path" which supports max 98 chars. In my case I have to delete files in a folder, which filenames are bigger than 99 chars so I can't use the table "file" to do it as it would not find this type of files. What would be a good solution to delete such files ?

Thanks for any Ideas!

Comments

  • DenSter
    DenSter Member Posts: 8,307
    Try 'Windows Script Host Object Model'.FileSystemObject, it's an automation type. It has a bunch of file commands that take string parameters. I've only used it in conjunction with the File data type in C/AL but it might accept parameters longer than 99 characters.
  • Nokio
    Nokio Member Posts: 52
    Thanks Dester,
    your tip helped me. I used the delete Folder / create Folder functionality to delete the files in the folder.

    Regards
    Nokio
  • DenSter
    DenSter Member Posts: 8,307
    Excellent, thanks for the follow up, and good to hear you got that to work :mrgreen: