cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Re: How to change Type of EPMDocument type in batch mode?

MartinStLo
8-Gravel

Re: How to change Type of EPMDocument type in batch mode?

As per the original post

 

Hello,
I am struggling with the authentication to avoid the  PopUp ( https://www.ptc.com/en/support/article/CS63015)
can you share how you push the --javaargs to make it works? Are you on UNIX/Linux server because the article mention that is limited to UNIX/Linux but at the same time in the note they also mention Windows... Our OS is windows so maybe this is the reason its not working. 

1 ACCEPTED SOLUTION

Accepted Solutions
N-Pyn
13-Aquamarine
(To:MartinStLo)

Hi Martin,

 

I'm running Windchill on Windows Server 2013. Here is the batch file that I made for changing types of EPMDocs:

 

:: Changes EPMDoc type in Windchill for files listed in the .csv

@echo OFF

:: Set the encoding to UTF-8 so special characters (Ä,Ö,Å..) work
chcp 65001

:: Ask for login info
set /p USER=Username?
set /p PASSWORD=Password?

:: Ask for the target type
set /p TARGET_TYPE=Target type?

:: Set csv file name variable
SET csvfile=%1

:: Loop through the csv and execute the SoftTypeChangeUtility for each file listed in the csv

FOR /F "USEBACKQ TOKENS=1 DELIMS=," %%a in ("%csvfile%") DO (

windchill --javaargs="-Dcom.ptc.net.auth.user=%USER% -Dcom.ptc.net.auth.password=%PASSWORD%" wt.epm.util.SoftTypeChangeUtility "%%~a" "%TARGET_TYPE%"
)

 

This uses a .csv file (comma-separated) which lists all the filenames of the objects that need to be changed.

 

View solution in original post

2 REPLIES 2
N-Pyn
13-Aquamarine
(To:MartinStLo)

Hi Martin,

 

I'm running Windchill on Windows Server 2013. Here is the batch file that I made for changing types of EPMDocs:

 

:: Changes EPMDoc type in Windchill for files listed in the .csv

@echo OFF

:: Set the encoding to UTF-8 so special characters (Ä,Ö,Å..) work
chcp 65001

:: Ask for login info
set /p USER=Username?
set /p PASSWORD=Password?

:: Ask for the target type
set /p TARGET_TYPE=Target type?

:: Set csv file name variable
SET csvfile=%1

:: Loop through the csv and execute the SoftTypeChangeUtility for each file listed in the csv

FOR /F "USEBACKQ TOKENS=1 DELIMS=," %%a in ("%csvfile%") DO (

windchill --javaargs="-Dcom.ptc.net.auth.user=%USER% -Dcom.ptc.net.auth.password=%PASSWORD%" wt.epm.util.SoftTypeChangeUtility "%%~a" "%TARGET_TYPE%"
)

 

This uses a .csv file (comma-separated) which lists all the filenames of the objects that need to be changed.

 

Thanks this work perfectly!

 

Top Tags