Created
April 8, 2015 14:07
-
-
Save caschwartz/44e5675f4194b4bfd767 to your computer and use it in GitHub Desktop.
Query to remove .DS_Store (and othe similar) files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
(: 12/20/14 Query to get a list of URIs from the dcweb database and delete .DS_Store files :) | |
declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
for $uri in cts:uris() | |
where contains($uri, "._.DS_Store") or contains($uri, ".DS_Store") or matches($uri, "\._") | |
return xdmp:document-delete($uri) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment