For windows: Insert code below in a file named for example "rename_files.bat". Then run the bat-file.
@echo off
Setlocal enabledelayedexpansion
:: Set working directory, insert searchpath to your files here
CD C:\temp
:: Set pattern for what you want to remove
Set "Pattern=-en-us"
Set "Replace="
:: Below is example to rename all csv files, change this to whatever your file extension is.
For %%f in (*.csv) Do (
Set "File=%%~f"
Ren "%%f" "!File:%Pattern%=%Replace%!"
)
------------------------------
Per Melinder
------------------------------
Original Message:
Sent: Thu March 04, 2021 01:04 PM
From: Joseph Bankston
Subject: Cognos 11 - Saving report to external file creates a XML file - disable this?
Can you provide the batch file to remove the "-en-us" from the files.
Thank you.
------------------------------
Joseph Bankston
Cognos Administrator / Sr Data Engineer
Texas
Original Message:
Sent: Mon August 19, 2019 04:14 PM
From: Cognos Guru
Subject: Cognos 11 - Saving report to external file creates a XML file - disable this?
Unfortunately, it's not possible. However, you can execute a simple batch script to remove "en-us".
Original Message:
Sent: Mon August 19, 2019 11:32 AM
From: Vithal Madhira
Subject: Cognos 11 - Saving report to external file creates a XML file - disable this?
Hello Dmitriy,
Is there a way to create the externally saved report without language and location ( "-en-us" ) appended to the file?
Thanks,
Vithal
------------------------------
Vithal Madhira
Original Message:
Sent: Fri August 16, 2019 06:15 PM
From: Dmitriy Zats
Subject: Cognos 11 - Saving report to external file creates a XML file - disable this?
Hello Jen,
When you save a report output to an external location, an XML descriptor file is also created for the output file. The descriptor file contains information about the report output, such as the name, locale, creation time, burst key, search path for the associated report, and report version contact. The descriptor file takes the name of the output file with the added suffix _desc
. For example, a saved PDF report named My report-en-us.pdf will have a descriptor file named My report-en-us_desc.xml.
The best way to remove those files is to create and schedule simple batch script with the following code:
del *_desc.xml
Also, I'm not sure if you noticed, but Cognos appends language and location (example: "-en-us") to all externally saved reports.
Let me know if you have any questions.
------------------------------
Dmitriy Zats
Original Message:
Sent: Fri August 16, 2019 03:03 PM
From: Jenifer Broughton
Subject: Cognos 11 - Saving report to external file creates a XML file - disable this?
Hello,
Scheduled reports saved to an external file location creates the report output file and a XML file.
Is there any way to not have this XML file automatically created and saved along with the report?
Thank you,
Jen
------------------------------
Jenifer Broughton
------------------------------
#CognosAnalyticswithWatson