Created
April 18, 2020 09:23
-
-
Save Roald87/c68ea920607ec8f32d977d32f3f82712 to your computer and use it in GitHub Desktop.
Batch script to make hardlinks from a TwinCAT plc project to a Unit test project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title Make hard links from project to test project | |
echo This script will make hard links of the project files in the POUs folder to the test project folder. | |
echo Before running this script make sure you already created the neccesarry folder structure in your Plc or TwinCAT project. | |
for %%i in (.\path\to\project\POUs\*.TcPOU) do ( | |
mklink /H .\path\to\testproject\POUs\%%~nxi %%i | |
) | |
pause |
Yes that is correct. You only have to link a file once.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the batch file is executed for the second time, Error is generated:
A file cannot be created if it already exists.