web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Use Txt2AL tool in Powershell?

(0) ShareShare
ReportReport
Posted on by 1,106

The txt2AL tool works fine in cmd line, but it would be SO much nicer to be able to put it in my Powershell script for exporting objects, creating deltas, etc.

Any suggestions?

In Command line...this works:

C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client>txt2al.exe --Source="C:\temp\ConvertToAL\Delta" --Target="C:\temp\ConvertToAL\AL" --ExtensionStartId=50000

But it doesn't work in PowerShell...

cd 'C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client';
.\txt2al -source 'C:\temp\ConvertToAL\Delta' -target 'C:\temp\ConvertToAL\AL' -rename -type Table -ExtensionStartId 50000;

#also tried
.\txt2al -source 'C:\temp\ConvertToAL\Delta' -target 'C:\temp\ConvertToAL\AL' -ExtensionStartId 50000;

#also tried
.\txt2al -source 'C:\temp\ConvertToAL\Delta' -target 'C:\temp\ConvertToAL\AL';

#also tried
.\txt2al.exe -source 'C:\temp\ConvertToAL\Delta' -target 'C:\temp\ConvertToAL\AL';

#also tried
.\txt2al -source 'C:\temp\ConvertToAL\Delta\' -target 'C:\temp\ConvertToAL\AL\';

But they all return the help error. (not so helpful!) pastedimage1631906964279v1.png

I have the same question (0)
  • Suggested answer
    Microsoft Dynamics 365 Business Central Profile Picture
    on at
    RE: Use Txt2AL tool in Powershell?

    Hi Greg

    I would start with this Link www.waldo.be/.../

  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at
    RE: Use Txt2AL tool in Powershell?

    I created convert.bat file with next code:

    txt2al --source=C:\Users\youruser\Documents\CAL\toconvert --target=C:\Users\youruser\Documents\CAL\converted --rename --extensionStartID 50000
    
    pause

    After that put this file into folder with txt2al.exe file.

    so you export cal files into *\toconvert folder, run convert.bat file and get result into *\converted folder

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sumit Singh Profile Picture

Sumit Singh 2,085

#2
YUN ZHU Profile Picture

YUN ZHU 1,810 Super User 2025 Season 2

#3
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,788

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans