I want create a Output file

Hi Members,

I want create a output file like if the input file name is “Golden_Test_Case.xlsx” then in the output file I want to give the name as “Golden_Test_Case_TodayDate in DD-MM-YYYY” format and in the end “_OutPutFil” how to achieve this.

Hey @Masuma_Khatun,

First Read the input file path into a variable inputFile .
Use an Assign activity:

outputFile = Path.GetFileNameWithoutExtension(inputFile) & "_" & Now.ToString("dd-MM-yyyy") & "_OutPutFil" & Path.GetExtension(inputFile)

This will generate Golden_Test_Case_03-09-2025_OutPutFil.xlsx.

Hi,
Use Assign activity: todayDate = Now.ToString(“dd-MM-yyyy”)
Assign Activity – Build Output File Name
Your input file name = Golden_Test_Case.xlsx
Your input file full path is in variable inputFilePath

inputFilePath = “C:\Users\Documents\Golden_Test_Case.xlsx”

inputFileName = Path.GetFileNameWithoutExtension(inputFilePath)
inputFolder = Path.GetDirectoryName(inputFilePath)
outputFileName = inputFileName + “_” + todayDate + “_OutPutFil” + Path.GetExtension(inputFilePath)

outputFilePath = Path.Combine(inputFolder, outputFileName)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.