Copy BBEdit Document Paths to Clipboard

Save the following AppleScript in ~/Library/Application Support/BBEdit/Scripts and run via BBEdit’s Scripts panel to copy the paths of all open documents in the active window to your clipboard:

    Copy paths of all open text documents in the active BBEdit window to your clipboard

tell application "BBEdit"
    set mydocs to every text document in window 1
    set urls to ""
    repeat with doc in mydocs
        set myurl to (URL of doc)
        if (myurl is not missing value) then
            set myurl to ((characters 8 thru -1 of myurl) as string)
            set urls to urls & {myurl} & "
        end if
    end repeat
end tell

if (urls is equal to "") then
    set the clipboard to urls
end if