Hello, I have done a workflow that downloads from an explicit URL, the download works, but i would like to see that file in a file explorer. How can I do it? (I have a hosted deployment mode)
Solved! Go to Solution.
Hi @Heku_ ,
You can use the File Transfer activity to download a file from an explicit URL and store it on your server. After the download is complete, you can use a Script activity to move the file to a specified location on your server.
Here are the steps to achieve this:
Here is an example that moves a file from the default download folder to a specified folder:
// Get the default download folder
var downloadFolder = xtks.downloadFolder;
// Get the name of the downloaded file
var fileName = workflowCtx.vars.filetransfer.filename;
// Set the destination folder
var destinationFolder = "C:/MyFolder/";
// Move the file to the destination folder
xtk.fs.move(downloadFolder + fileName, destinationFolder + fileName);
Note that the script assumes that the downloaded file is in the default download folder, stored in the xtks.downloadFolder variable. If you have configured a different download folder in your File Transfer activity, you will need to modify the script accordingly.
Also, make sure that the file destination folder exists and that the user running the workflow has permission to write to it.
Once you have added and configured the Script activity, you can save and run your workflow. After it has finished running, the downloaded file should be in the specified file explorer location.
Hi @Heku_ ,
You can use the File Transfer activity to download a file from an explicit URL and store it on your server. After the download is complete, you can use a Script activity to move the file to a specified location on your server.
Here are the steps to achieve this:
Here is an example that moves a file from the default download folder to a specified folder:
// Get the default download folder
var downloadFolder = xtks.downloadFolder;
// Get the name of the downloaded file
var fileName = workflowCtx.vars.filetransfer.filename;
// Set the destination folder
var destinationFolder = "C:/MyFolder/";
// Move the file to the destination folder
xtk.fs.move(downloadFolder + fileName, destinationFolder + fileName);
Note that the script assumes that the downloaded file is in the default download folder, stored in the xtks.downloadFolder variable. If you have configured a different download folder in your File Transfer activity, you will need to modify the script accordingly.
Also, make sure that the file destination folder exists and that the user running the workflow has permission to write to it.
Once you have added and configured the Script activity, you can save and run your workflow. After it has finished running, the downloaded file should be in the specified file explorer location.
Hello, thank you for your reply. I understand all the steps, but what file explorer should I use to access the file? (I have a hosted deployment mode)
Views
Replies
Total Likes
Hi @Heku_,
To access the file, you can check the below:
The specific file explorer or method for accessing files in your hosted deployment would depend on your hosting environment and the options provided by your hosting service.