Add an specific field from a PDF into the file name in a batch file - date

I'd like to add a specific field from a PDF into its file name in a batch file.
For example, there is a date on page 1 in the PDF file and I'd like to include that date in the name. How do I create the batch file?
In the following screenshot:

Related

How to copy file based on date in Azure Data Factory

I have a list of files in a adls container which contain date in the name as given below:
TestFile-Name-20221120. csv
TestFile-Name-20221119. csv
TestFile-Name-20221118. csv
and i want to copy files which contain today date only like TestFile-Name-20221120. csv on today and so on.
I've used get metedata activity to get list of files and then for each to iterate over each file and then used set variable to extract name from the file like 20221120 but not sure how to proceed further.
We have something similar running. We check an SFTP folder for the existanc e of files, using the Get Metadata activity. In our case, there can be folders or files. We only want to process files, and very specific ones for that matter (I.e. we have 1 pipeline per filename we can process, as the different filenames would contain different columns/datatypes etc).
Our pipeline looks like this:
Within our Get Metadata component, we basically just filter for the name of the object we want, and we only want files ending in .zip, meaning we added a Filename filter:
:
In your case, the first part would be 'TestFile-Name-', and the second part would be *.csv'.
We then have a For Each loop set up, to process anything (the child items) we retrieved in the Get Metadata step. Within the For Each we defined an If Condition to only process files, and not folders.
In our cases, we use the following expression:
#equals(item().type, 'File')
In your case, you could use something like:
#endsWith(item().name, concat(<variable containing your date>, '.csv'))
Assuming all the file names start with TestFile-Name-,
and you want to copy the data of file with todays date,
use get metadata activity to check if the file exists and the file name can be dynamic like
#concat('TestFile-Name-',utcnow(),'.csv')
Note: you need to fromat utcnow as per the needed format
and if file exists, then proceed for copy else ignore

How to get file name which extension is .txt at given path in ps1

I want to get one by on file name which extension is .txt at any given location in ps1. for example my file location is C:\ProjFile and here I have multiple .txt file and I want to get one by one file name

Powershell Only:File name change according to mapping file and then copy to another directory

I have a mapping file in import.CSV as following:
Name|Business
Jack|Carpenter
Rose|Secretary
William|Clerk
Now, I have a directory which contains files like
90986883#Jack#Sal#1000.dat
76889992#Rose#Sal#2900.dat
67899279#William#Sal#1900.dat
12793298#Harry#Sal#2500.dat
Please note #Sal will always be there after Name. I need to pick these files and put into another directory and end result in second directory should look like.
90986883#Carpenter#Sal#1000.dat
76889992#Secretary#Sal#2900.dat
67899279#Clerk#Sal#1900.dat
Basically Files need to be renamed based upon CSV file and if Name is not there in file name , then there is no action required. Please note that source file should not be changed.
I will appreciate all kind of help.

Rename PF-SRC file record name

Can someone tell me how to rename the record name of a PF-SRC?
Like: MYLIB/QRPGSRC has record format QDDSSRC. I want to change it to QRPGSRC.
I tried CHGPF and CHGSRCPF but there was no option for record name.
Thanks!
I don't think you can change a record format name for a file. If you create a new source physical file named QRPGSRC, the record format will be QRPGSRC. If you simply duplicate a file and change it's name, the record format name will be different from the file name.
So your best bet will be to create a new source file with the appropriate name, and copy the members from the old file to the new file.

Include text file in Report

Is it possible to include a plain text file to print in the Title band of a jasper report?The text file may reside in a local or remote folder with a dynamic file name.The filename shall be accessed in a field on the data source.
I wound suggest you simply create a String report parameter, then you can just load content of text file before you export the report.
Here is a simple example:
JRExporter exporter = ...
...
...
exporter.setParameter("TITLE_TEXT", loadTitleTextFromFile());
exporter.exportReport();
where loadTitleTextFromFile() is the method that read file content and return as a string.