# Finding out the latest file of the executables

**URL:** <https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324>\
**Category:** Programming\
**Tags:** automation-runtime\
**Created:** [May 21, 2026, 4:45pm UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324 "2026-05-21T16:45:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flystedt](https://avatars.discourse-cdn.com/v4/letter/f/FF8800/32.png) [@Flystedt](https://community.br-automation.com/u/Flystedt)\
**Post date:** [May 21, 2026, 4:45pm UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/1 "2026-05-21T16:45:37Z")

</div>

I want to find out the latest date of my executables, \*.br, or simply when was the latest program change done.

I try this by using **DInfo** () and **DRead** () in StructuredText, AS4x and search among the found files and their date.

The code works if I search device ‘user’ that is created with DevLink\_0 and "/DEVICE=F:/Data "

But not sure how to access the path of the drive where executables are located. I tried using DEVICE=D: and some combination of that. The best I get is an error 20706 fiERR\_ACCESS.

Any idea on how to do this? Maybe there is a better idea than using DInfo/DRead.

SDM that is part of our HMI can view executables with file date, but I need my application to read it out.

| | |
| --- | --- |

I

---

<div class="post-metadata">

**Author:** ![marcusbnr](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/marcusbnr/32/256_2.png) [@marcusbnr](https://community.br-automation.com/u/marcusbnr)\
**Post date:** [May 21, 2026, 5:53pm UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/2 "2026-05-21T17:53:42Z")

</div>

If you’re just looking to get information about the last program change, then I highly recommend [BuildVersion](https://github.com/br-automation-community/BuildVersion). It runs a Powershell script during a project build to get the current git information (branch, tag, uncommitted changes, etc.) and then stores that information in the project such that it can be viewed after the change is transferred to a machine.

---

<div class="post-metadata">

**Author:** ![HitchcockN](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/hitchcockn/32/9815_2.png) [@HitchcockN](https://community.br-automation.com/u/HitchcockN)\
**Post date:** [May 21, 2026, 5:56pm UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/3 "2026-05-21T17:56:40Z")

</div>

@Flystedt,  
Just for some background information, the reason for why DevLink threw error “20706” was because of the partition you were trying to access. Take a look at the Information from the help explorer about FB Devlink

“Read and write operations on the partitions of the safe module system (D: and E:) are no longer possible. Changes to the project may therefore be necessary when changing versions.”

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/e/e97cd1591bf8772e4518ef7f012bd5ab1f743bf7.png)

[DevLink](https://help.br-automation.com/#/en/4/libraries/fileio/fbks/devlink.html)

For Reference, the partitioning of the CFast/CompactFlash (without hypervisor) is as such:

**SYSTEM partition (C:)** - Always the first partition  
**DATA1 (D:) and DATA2 (E:)** - DATA1 mirrors to DATA2 for redundancy. Contains RPSHD/SYSROM and RPSHD/USERROM subdirectories  
**USER partition (F:)** - Completely free for user applications

for more info see the following from the help explorer.

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/0/09f5e04b71bd7599142e51e7f87bc80b70a90307.png)

[Storing data on the CF card](https://help.br-automation.com/#/en/4/automationnet/pvitransfer/operation/backuprestore/pvitransfer_backuprestore_datastoragecf.html)

---

<div class="post-metadata">

**Author:** ![Flystedt](https://avatars.discourse-cdn.com/v4/letter/f/FF8800/32.png) [@Flystedt](https://community.br-automation.com/u/Flystedt)\
**Post date:** [May 22, 2026, 6:32am UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/4 "2026-05-22T06:32:01Z")

</div>

Thx for info Noah.

So if Devlink do not support reading D: or E: where executables are stored, I guess that is not the way to find out.

However should it be possible in some other way. Using SDM(SmallDiagnosicManager) can I on a web page see and upload the modules, even save them as an csv-file. So there must be some FB or other way I can use to retrieve the \*.br modules.

I want my application to find out and use that information.

---

<div class="post-metadata">

**Author:** ![christoph.hilchenbac](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/christoph.hilchenbac/32/423_2.png) [@christoph.hilchenbac](https://community.br-automation.com/u/christoph.hilchenbac)\
**Post date:** [May 22, 2026, 6:56am UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/5 "2026-05-22T06:56:08Z")

</div>

Hello @Flystedt ,

it might be helpful if you could describe the use case to us.

Are we talking about “files” or “modules”?

\*.br ist just a container file for many types of modules and later versions of AR might handle this in a different way (e.g. SG3 PLCs didn’t use a file system).

You can retrieve information about ‘modules’ using [MO\_info()](https://help.br-automation.com/#/en/4/libraries%2Fsys_lib%2Ffbks%2Fmo_info.html), which I believe is more reliable than relying on the creation date of files, which depends on the underlying file system and can be manipulated.  
MO\_info not only delivers the creation date but also address and size of the data that can be later on used to calculate a reliable hash checksum.

---

<div class="post-metadata">

**Author:** ![Flystedt](https://avatars.discourse-cdn.com/v4/letter/f/FF8800/32.png) [@Flystedt](https://community.br-automation.com/u/Flystedt)\
**Post date:** [May 22, 2026, 8:09am UTC](https://community.br-automation.com/t/finding-out-the-latest-file-of-the-executables/11324/6 "2026-05-22T08:09:03Z")

</div>

Hi Christoph

You are right, I just found MO\_Info() in help, and combining with MO\_List() or sIMoList() it should do the trick and give me what I need.

/Sten
