Hey!
I have a given url in Input Tool and connect the Input tool with a Download Tool.
I configure the Download Tool to Output to a File >> Temporary File
As responce a get a Browse Tool a string with a file path
C:\..\AppData\Local\Temp\mytmporaryfile.tmp
Can I copy the Tempory File Path to a new location following my election and change his file extension.
I want to change the .tmp to a .png extension to display the png file on an Alteryx Workflow!
I that possible in Alterxy?
How?
Mathiias
Solved! Go to Solution.
Hi Mathias,
Your best option here would be to output to an actual file rather than the temp file. The temp file is not meant to be reused... When you select the output file, you can still have that in a temp directory by referencing %temp% as your path, that way it is still in a temp file that can be cleaned up by your computer, but is able to be referenced for now.
Kane
Hey Kane!
Thank you for your support
I am looking for a solution together with Alteryx:
Is there exists an Alteryx-Tool that is made possible using and working with the temp-file:
1. Copy the temp file from the temp-file directory to a new location following my election. Such as C:\..\AppData\Local\Temp\mytmporaryfile.tmp => C:\alterxy\mytmporaryfile.tmp
2. Rename the temp-file and change the file extension. Such as C:\alterxy\mytmporaryfile.tmp => C:\alterxy\mypicture.png
3. Display the "new"-file with another Alteryx-Tool.
Or is there an other solution?
Mathias
Hi Mathias,
You can create a batch file and run that using the Run Command tool to move and rename the temporary file. The tricky part will be getting the right directory for the temporary file, hence why I suggested saving it to an actual file.
The Batch file would simply be something like:
xcopy "C:\..\AppData\Local\Temp\mytmporaryfile.tmp" "C:\alterxy\mytmporaryfile.tmp"
ren "C:\alterxy\mytmporaryfile.tmp" "C:\alterxy\mypicture.png"
The way that I understand your workflow is:
The issues with this arise from, how are you going to select that you want that file copied? I take it that it is in another workflow. And if so then you may have trouble finding that temp directory to get the image from.
Kane
Hi Kane!
Thank you for your support. I have create a batchfile to execute withhin the Run Comman Tool.
But I do not understand what for an Input Connection and Output-Connetion is nessasary. I try this:
Because when I run the workflow I get an excepition:
Run Command (1) Either an Output connection or Input connection is required.
The Select-Tool selcted the DownloadTempFile.
Who is my bug?
Mathias
Hi Mathias,
If you don't care about what is coming into or out of the Run Command tool, then firstly, no need to connect it... if you want it to run in process though, then it will work essentially like this...
So, if you don't want anything to continue after the Run Command, then don't put anything in the "Read Results" and don't connect any tool after the Run Command. If you don't need any data flow coming into the Run Command tool, then don't put anything in to the "Write Source" and don't connect anything to the start of the Run Command Tool.
I have attached a module that downloads some pictures, saves them somewhere and then moves 3 of the 5 images so that you can see how it works. In this module the batch file is created by the data stream that is coming in so that way it is dynamic.
Kane
Hi Kane,
I understood the example, thank a lot.
I have change it to my needs, so I need an external batchfile any more.
Mathias
Best explaination I have seen on this tool.
Thanks.