My robot downloads a file from web. I want to find this recent file and download it to sharepoint. Sharepoint download I can do if I know the name of the file. I found Sarathis advice about how to do it. I copied it and found my recent file, but how to to combine recent file and upload to sharepoint? Pleae help thank you.
I download a file from web. In my example it was Gant sheet excel. (“C:\Users\Anni\Downloads\Gantt sheet.xlsx”)
Let’s pretend I don’t know where it got saved. I want to pick up my latest excel save.
Here, this sequence seems to work. Execution started, Gantt sheet got found and execution ended.
The other thing I try to do is upload a file to Sharepoint. I can upload the file to sharepoint if I know the name and the location. See picture below:
But how to make recent file to get uploaded to sharepoint? Btw. I don’t get those variables on the topper picture… I think the answer may lay somewhere there… Thank you for your time!
What is the default value of the directory variable in screenshot 1?
Should the Local Path value in screenshot 2 be directory+fileNameRecent.Name? Unless I am missing something or not understanding your question correctly.
Hi
If we can SYNC the share point to our local machine then it would be very easy
Like in share point we got an option at the top left as Sync
If we enable that option that share point folder will be included to our local machine drive
So that we can easily access the files in share point by taking that folder location from our system itself
Once after syncing
Use this expression to get the filepath of latest saved file from a folder
str_filepath = Directory.GetFiles(“yourfolderpath”).OrderByDescending(Function(a) New Fileinfo(a).CreationTime).ToList(0).ToString
Then use a normal MOVE FILE activity as we have now synced the share point as a normal folder to our local machine
Where in the activity mention the path property as str_filepath and in the destination mention the folder path of the synced share point folder
Thank you, the little robot is fully functional now. I had made one extra folder transfer which I didn’t need at all.
True it was that since I had tried all sorts of stuff I needed to make sure Directory info variable was right, then I needed to check out correct paths for local path. The mistake I made was to copy the full path like "C:\Users\Anni\Downloads" and then to hit + and have the fileNameRecent.Name -.-’