Jump to content
UBot Underground

Scrape Dokument-Names From A Folder

Recommended Posts

Hi @all, 


i have a folder with some .pdf documents like 19-0215458-test.pdf or 20-0357896.pdf


Now i want to scrape the first 10 digits from each document name.  :unsure:


Can someone help me please ?  :)

Link to post
Share on other sites

Here is a function with an example:


clear list(%files)
add list to list(%files,$list from text("19-0215458-test.pdf
20-035789620-035789620-035789620-0357896.pdf",$new line),"Delete","Global")
loop($list total(%files)) {
    set(#file,$next list item(%files),"Global")
define $GetFirstTenDigits(#_text) {
    comment("Get all digits")
    set(#_digits,$replace regular expression(#_text,"[^0-9]+",$nothing),"Local")
    if($comparison($text length(#_digits),"< Less than",11)) {
        then {
            comment("If less than 11 then return")
        else {
            comment("Else return first 10 only")

  • Like 1
Link to post
Share on other sites

only here i can´t find a solution: 


"$list from text" is no problem, but never before scraped dokument names from a folder. 



add list to list(%file,$scrape attribute(<??>,"??"),"Delete","Global")





Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...