List of Files in a directory

skblam
Member Posts: 24
Hi,
I would like to know how can I get the list of files in a specific Directory.
Thanks for your Help
<img border="0" title="" alt="" src="images/smiles/icon_rolleyes.gif" />
SL.
I would like to know how can I get the list of files in a specific Directory.
Thanks for your Help
<img border="0" title="" alt="" src="images/smiles/icon_rolleyes.gif" />
SL.
0
Comments
-
You can do a SHELL statement:
eg.
SHELL('c:\windows\dir');
You can also use any automation variable which would support this capability. Try Microsoft Shell Controls and Automation.0 -
Hi Yang,
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" />0 -
You can define a variable: Name = files; datatype = record, Subtype = File
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);0 -
What I would like to do is :
- 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" />0 -
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.0
-
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.0
-
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".0 -
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" />GB0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions