Good evening everyone.
I apologize if this has been answered before, I've been searching around for a while with no luck, tough. 😞
I've built a flow that whenever a file is added to my business SharePoint folder, this new file gets automatically copied to my business OneDrive folder as a backup measure. However, I haven't been able yet to make it that whenever a new .ZIP file is created, it gets copied to my OneDrive folder and also gets unzipped.
The template I built is shown above. Whenever a new file is created into one specific folder from my company's SharePoint, the flow creates a folder with a name related to today's date and then saves it there. But what else should I do in order that the flow also unzip the ZIP files it eventually copies??
<EDIT>: Just out of curiosity, this flow already works fine except for the non-auto-extracting routine. I've noticed this little weirdness: the zip files that the flow copy from Sharepoint to OneDrive are not recognized as regular zip files by 7zip at first, I have to manually open them with 7zip and only then 7zip recognizes them as "compressed folder" files so that I can unzip them. Kinda weird...
Solved! Go to Solution.
Hi @VitorBart
I guess the issue is causing because the second parameter is expecting a Folder whereas in below screenshot it appears to be the zip file itself. Try just giving the folder path.
-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.
Hi @VitorBart ,
Tried the below and it appears to be working as expected.
Can you also ensure you are passing the actual filename in the following parameter? Your action before is creating the file as the 'Name' parameter. Do you have it after your formatDateTime()?
If so, can you share it?
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi @VitorBart ,
Are you already using the extract actions below to unzip compressed files?
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Actually, this is what I did try but does not seem to work at all.
After being copied to my Onedrive folder, the zip file is supposed to be extracted to its folder (the folder where the ZIP file already is) but nothing happens after the zip file is created.
tkz!
Hi @VitorBart
I guess the issue is causing because the second parameter is expecting a Folder whereas in below screenshot it appears to be the zip file itself. Try just giving the folder path.
-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.
Thanks for the tip but actually both second and first parameter already refer to folder names, the dynamic pink box string is there because each folder created on each day must be named according to the date when the file was placed on Sharepoint.
Hi @VitorBart ,
Tried the below and it appears to be working as expected.
Can you also ensure you are passing the actual filename in the following parameter? Your action before is creating the file as the 'Name' parameter. Do you have it after your formatDateTime()?
If so, can you share it?
--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up
Connect on LinkedIn
Hi @VitorBart
Are you referring that the first and the second parameter already have the same folder names?
They will need to be different - one is the zip file and the other is the folder where the files will be unzipped.
If the dynamic pink box is the folder name (2nd parameter) then what is in the file name (1st parameter?
Is there a .zip concatenated to it?
Do print both in a compose and check if they are coming out correctly.
-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.
Hey @eric-cheng, thanks for the tip. Answering to your question I did not have the 'Name' parameter after my formatDateTime(), so if I got it right, I am supposed to make it look like the above picture.
The yellow parts are the ones I added after reading your reply, hope I got it right:
@VJR wrote:Hi @VitorBart
Are you referring that the first and the second parameter already have the same folder names?
I thought that both first (1) and second (2) fields were meant to indicate the FOLDERS where (1) the zip file is located and the folder (2) on which I want to have the zip extracted to. I have just modified the first field in order to include the complete path of the zip file including the zip file's name as suggested by @eric-cheng
They will need to be different - one is the zip file and the other is the folder where the files will be unzipped.
I see, I hadn't realized that, the field description is kinda poorly named, uh? It only mentions the path name, not the full path including the file name too.
If the dynamic pink box is the folder name (2nd parameter) then what is in the file name (1st parameter?
Is there a .zip concatenated to it?
The 1st parameter was pointing to the path where the zip file was located but now I've added the "Name" that comes from the Sharepoint step after the pink box as shown above.
Do print both in a compose and check if they are coming out correctly.
I'm sorry, what does that mean? 😞
Thanks a lot for your help!
-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.
Hi @VitorBart
Do print both in a compose and check if they are coming out correctly.
By the above line I meant that
- Take a Compose action and use the Inputs same as the one you added in the "Source Archive File Path" parameter
- After running it will show the complete text that was passed in the parameters
- Do the same for the other parameter ie; "Destination Folder Path"
- By doing this you will come to know whether you are passing the correct parameters/path or not.
- Also make sure that you are not passing any of the characters that are not allowed for a file name.
This happens accidentally when we try to format the date with an invalid character like dd/MM/yy hh:mm:ss
In the above example, forward slash / and colon : are invalid file or folder naming characters.
-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.
I got it !!
My mistake was not correctly pointing to the file as mentioned by @eric-cheng !!! I was only pointing to the folder.
@VJR thanks a lot for the compose hint, i didn't know it existed, lol.
I had to add one condition, tough. Some files were not zip archives so I kept getting error messages.
This is the final result:
User | Count |
---|---|
27 | |
16 | |
16 | |
12 | |
11 |
User | Count |
---|---|
42 | |
30 | |
28 | |
24 | |
24 |