Hello Jarus,
We may need to write some extra scripting to get the file name.
Can you check if the following works ?
echo off
echo 1: %1
echo 2: %~nx1
SET data=%~nx1
FOR /f "tokens=1,2 delims=;" %%a IN ("%data%") do echo %%a&
Program : cmd /c c:\test\build.bat ["version"]
Sample Output :
============
---------- Begin <TestUDP> Process ---------------
C:\Program Files\CA\SCM>echo off
1: "\hmvrepo\JHSDKSampleProject .har;1"
2: JHSDKSampleProject .har;1
JHSDKSampleProject .har
I00060052: TestUDP execution was successful.
---------- End <TestUDP> Process ---------------
Thanks,
Sridhar
Original Message:
Sent: 02-25-2021 05:03 AM
From: Jarus Bosman
Subject: hexecp and System Variables - File name / Item name only
Hi,
I'm running some scripts on a Windows agent. I would like to send the file name / item name as arguments, but I can currently only use the [version] system variable which includes the complete path, item names and version numbers if applicable. I there a way to get hold of just the item name?
Thank you in advance