You can't "store" file names in a codeunit. Use a table object for this. And yes, you do need the C/OCX license to create automation variables. It costs about $1100. Just contact Axentia if you want to purchase.
On the installation CD of Navision, there is a 'tool' called compare. If you load these fob's, you can look how to manage your problem very easily. I have done this for one of our clients.
sorry, I don't understand why you must store the filenames in the codeunit !
you have the filenames in the temporary table and you can store these in a "normal table".
There are 2 system tables in Navision show you drive and files. In Attain 2000000020 - drive, and 20000000022 - File. Why not use these???? <img border="0" title="" alt="" src="images/smiles/icon_cool.gif" />
Comments
eg.
SHELL('c:\windows\dir');
You can also use any automation variable which would support this capability. Try Microsoft Shell Controls and Automation.
To be able to use the automation controls, I shall need the automation granule (C/OCX license).
please confirm.
Thanks for your help
SL. <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
With the following code you have the list of files in the table files.
files.SETRANGE(Path,'C:\');
files.FIND('-');
files.SETRANGE(Path,'Name of the directory');
files.SETRANGE("Is a file",TRUE);
- Get a list the files.
- Load these files in Navsion with the appropriate Dataport
- Back up the Files.
So, I need to store the filename in my Code Unit.
How can I get store the filenames in my codeunit.
Thanks
SL.
<img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />
you have the filenames in the temporary table and you can store these in a "normal table".