How can I automatically name the file after using Microsoft Print to PDF function in Power Automate? - printing

I am trying to automate printing a list of PDF files in a folder and renaming the newly printed copies with a different name.
Workflow.
Drop all pdf files into folder
Loop through all files doing the following:
A "Print to PDF"
B Name new file when "Save Print Output As" window opens
I have created the following steps (see image below). The issue is that I cannot find a way to call the current item's name and input it into the file name and save it. What ends up happening is at the end of the execution of the flow, I get all the Save Output windows at once and I am not sure which one is what.
enter image description here

Related

How to allow users to Upload local file, Edit in sheets, and Write back to local file

I'm investigating if it's possible for a user to: Pick a file on disk, automatically upload it to Google Sheets, do some edits, and write the changes back to the file.
I basically want to use Google Sheets as the Editor of the local file.
Has anyone tried something like this, or can confirm if it's a feasible idea?
My rough idea:
Install a script or program, that a user (on our team) can execute with the appropriate file they pick.
Typically they right-click a file and pick "Open with MyGoogleSheetsCreate".
The ToSheets-script does the following:
Generates a temporary Spreadsheet on the user's Google Drive (or possibly a Team Drive/Folder for temp files)
Reads the custom data in the local file and enters it into the Spreadsheet.
Opens a Browser window with the generated spreadsheet.
The user makes some changes to the spreadsheet.
The user exports the changes back to the file.
User initiates this how? Some ideas:
Perferably: I build a button or menu option to "Export back to Local Disk". This would only be viable if we could explicitly say where to save this custom file, i.e. where it came from.
Optionally: They right-click the original file and pick "Open with MyGoogleSheetsRetrieve". The importer would need to know the address of the Google Sheet the local file was last exported to.
FromSheets-Script converts the Spreadsheet into our custom data format and overwrites the old file.
Bonus: The temporary Google Sheet would be automatically moved to the Bin within a couple of days (without user interaction).
I think I've got a good idea of how to convert our custom format to Sheets and vice versa. The steps I'm most unsure of are: 3.1 and 5.1

Automation using Loop command

I am using a loop in a folder to check for acrobat reader if the folder contains pdf files but the loop is not running yet.
I am able to open the pdf file manually.
Can anyone suggest why I am not able to run the loop?
Loop While Window Exist ("Adobe Acrobat Reader") Then
Delay: (5 sec)
End Loop
You'll need to start the loop for "Each File in Folder" and specify the directory location to look in. Then You'll need to use the system variables $FileName$ and $Extension$ to look for each .pdf and open them. Please see my example code below.
AA's documentation on this process is here
If you're just checking to see if the file in a folder exists, then you would use the If/Else command for "File Exists" in place of the "Open File" command I provided as an example. AA also has documentation on that here.

go-jira command line to force input from a file instead of the editor

I use the command line go-jira from Netflix to automate some tasks with JIRA. In certain circumstances I am asked to enter a multi-line input content through an editor. For example with the command:
jira.exe create --editor="notepad++.exe"
The program then expects me to save the file of the editor and then go-jira completes the action by picking up the saved file. The file format is BTW YML.
Is there a way to tell go-jira to use automatically an existing file instead of using the interactive editor?

Troubleshooting ZPL editing and saving to printer flash

I am using ZebraDesigner to create labels and save them as .zpl, files, then manually editing the zpl code to customize it further, and then save it in the printer's directory in onboard flash memory.
I see the .zpl files, listed with their sizes, in the flash directory, but the files are blank when opened, or sometimes contain text belonging to another file. If I try to paste new code into the file in flash, I'm unable to save it; meaning, I click save, and the web pages merely changes the file extension from ".zpl" to "---", then if I save again, then I get an error the script could not be saved.
I've been unable to get sufficient information nor resolution by contacting Zebra or looking at the product documentation. Advice would be appreciated.

Get file name of file used to open the associated application

I want to write a small app that does some data manipulation on the contents of a simple text file.
I just want to be able to right click such a file, choose 'Open with' in Windows, select my app, then the app opens, parses the file, does some stuff and closes immediately again.
Question: when my app starts, how do I get the file name that triggered the app to start?
Thanks!
You get the file as parameter number 1.
You can get it with the function ParamStr(1).
Have a look here for more details:
http://www.delphibasics.co.uk/RTL.asp?Name=ParamStr
For your information, ParamStr(0) is the filename (including complete path) of your EXE application.

Resources