copying files from one folder to the other folder

%3CLINGO-SUB%20id%3D%22lingo-sub-1283779%22%20slang%3D%22en-US%22%3Ecopying%20files%20from%20one%20folder%20to%20the%20other%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1283779%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20move%20files%20from%20main%20documents%20to%20archive%20folder%20on%20a%20daily%20basis%2C%20meaning%201%20day%20or%20older%20files%20will%20be%20moved%20to%20Archive%20folder.%20But%20my%20flow%20is%20throwing%20an%20error%20at%20%22Get%20files%20(properties%20only)%22%20step.%26nbsp%3B%20Could%20you%20please%20help%3F%3C%2FP%3E%3CP%3EBelow%20is%20the%20flow%20step%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22minime100_0-1586157197230.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F182300i74DFF73A49CC319A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22minime100_0-1586157197230.png%22%20alt%3D%22minime100_0-1586157197230.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAnd%20this%20is%20an%20error%20I%20am%20receiving%20during%20run%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22minime100_3-1586157473740.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F182303i9BC3283E45B1BA97%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22minime100_3-1586157473740.png%22%20alt%3D%22minime100_3-1586157473740.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3CBR%20%2F%3E%22status%22%3A%20400%2C%3CBR%20%2F%3E%22message%22%3A%20%22The%20expression%20%5C%22EventDate%20It%20datetime'2020-04-05T06%3A59%3A12.7849439Z%5C%22%20is%20not%20valid.%20Creating%20query%20failed.%5Cr%5CnclientRequestId%3A%202b1c4d08-0ba9-4fe6-80a9-405befbab0e1%5Cr%5CnserviceRequestId%3A%202b1c4d08-0ba9-4fe6-80a9-405befbab0e1%22%3CBR%20%2F%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1283779%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1283985%22%20slang%3D%22en-US%22%3ERe%3A%20copying%20files%20from%20one%20folder%20to%20the%20other%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1283985%22%20slang%3D%22en-US%22%3EYou%20are%20hitting%20one%20of%20the%20%22usual%22%20problems%20when%20dealing%20with%20dates%20in%20SPO.%20You%20might%20need%20to%20make%20some%20pre-processing%20with%20the%20date%20data%20so%20it%20can%20be%20accepted%20by%20SPO%20with%20no%20problems%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1284881%22%20slang%3D%22en-US%22%3ERe%3A%20copying%20files%20from%20one%20folder%20to%20the%20other%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1284881%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F610549%22%20target%3D%22_blank%22%3E%40minime100%3C%2FA%3E%26nbsp%3Bit's%20not%20a%20SharePoint%20problem%2C%20there%20are%20several%20problems%20with%20your%20filter%20query.%20The%20text%20datetime%20shouldn't%20be%20there%20at%20all%2C%20there%20should%20be%20a%20space%20before%20the%20opening%20single%20quote%2C%20and%20you've%20left%20out%20the%20closing%20single%20quote.%20It%20should%20look%20like%20this%20(although%20my%20example%20uses%20the%20Created%20column%20rather%20than%20another%20one)%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22getFiles-lt.png%22%20style%3D%22width%3A%20696px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F182369i0851F11900EF618F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22getFiles-lt.png%22%20alt%3D%22getFiles-lt.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20color%3D%22%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1285570%22%20slang%3D%22en-US%22%3ERe%3A%20copying%20files%20from%20one%20folder%20to%20the%20other%20folder%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1285570%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%26nbsp%3B%2C%20i%20will%20try.%20Please%20share%20any%20documentation%20if%20you%20have.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

I am trying to move files from main documents to archive folder on a daily basis, meaning 1 day or older files will be moved to Archive folder. But my flow is throwing an error at "Get files (properties only)" step.  Could you please help?

Below is the flow step:

 

minime100_0-1586157197230.png

And this is an error I am receiving during run:

minime100_3-1586157473740.png

 

{
"status": 400,
"message": "The expression \"EventDate It datetime'2020-04-05T06:59:12.7849439Z\" is not valid. Creating query failed.\r\nclientRequestId: 2b1c4d08-0ba9-4fe6-80a9-405befbab0e1\r\nserviceRequestId: 2b1c4d08-0ba9-4fe6-80a9-405befbab0e1"
}

 

Thanks in advance!

3 Replies
You are hitting one of the "usual" problems when dealing with dates in SPO. You might need to make some pre-processing with the date data so it can be accepted by SPO with no problems

@minime100 it's not a SharePoint problem, there are several problems with your filter query. The text datetime shouldn't be there at all, there should be a space before the opening single quote, and you've left out the closing single quote. It should look like this (although my example uses the Created column rather than another one):

getFiles-lt.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Thanks @Juan Carlos González Martín , i will try. Please share any documentation if you have.