Hi,
I try to get (all) recent modified files via WebDAV:
curl -X SEARCH https://${SERVER}/remote.php/dav -u ${USER}:${PW} $I \
-H "content-Type: text/xml" \
--data "<?xml version=\"1.0\"?>
<d:searchrequest xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">
<d:basicsearch>
<d:select>
<d:prop>
<oc:fileid/>
<d:getcontenttype/>
<d:getetag/>
<oc:size/>
<d:getlastmodified/>
</d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/files/${USER}</d:href>
<d:depth>1</d:depth>
</d:scope>
</d:from>
<d:where>
<d:gte>
<d:prop>
<d:getlastmodified/>
</d:prop>
<d:literal>Tue, 1 Jun 00:00:00 GMT 2021</d:literal>
</d:gte>
</d:where>
<d:orderby/>
</d:basicsearch>
</d:searchrequest>" \
| xmllint --format -
(for speed reasons is depth
here only 1
)
How do I get the where
part correct?
- with
<d:gte>
I get all files, without restriction to the date - with
<d:lt>
I get an empty result
?