$files=FileNames["*.jpg",{"/Users/meng/DataSpace-Library/Library/Schedule/Schedule-Section-MacroArtStudio/calligraphy/隶书/龚望__《曹全碑》通临"},Infinity];

$allFiles=RightComposition[
StringSplit,
FileNameTake[#,-1]&/@#&
][$input];

RightComposition[
(*#[[;;5]]&,*)
With[
{idx=Position[$allFiles,FileNameTake[#,-1]]//Flatten//First},
CopyFile[#,"~/Temp/"<>ToString[idx]<>".jpg"]
]&/@#&
][$files]

$input="http://dingyue.ws.126.net/5IwhpfZ9K=u6xqA8sVoiLjPpey2j=1=7gHChh6qyj9ha41555813708826compressflag.jpg
http://dingyue.ws.126.net/U=qG4P08y4fNYB4uJYvpNMN6Z2lcWTYNDcSki7eYU261k1555813709753compressflag.jpg
http://dingyue.ws.126.net/hnWPhmK4OZv4M0vwab7pS9x3ZZn0vC1ICVsFk87iO0erY1555813710496compressflag.jpg
http://dingyue.ws.126.net/hFDhoOYqaq9g9bojqhFlOriV78ZWYcrz6=UvtCRPiOYNF1555813711125compressflag.jpg
http://dingyue.ws.126.net/3dTdB0OHWzfSqOnRG8qP8utlct2z5S22zRcAcGXBLljR51555813712164compressflag.jpg
http://dingyue.ws.126.net/1IeM8YsnPXrWOzVt=oPAZaixCfRp1WD6SMlHySaYutXo31555813713437compressflag.jpg
http://dingyue.ws.126.net/20wC2hyKtWxbc72oHxl20UGu2VJGb27G4XXgn7EkfYkRO1555813714677compressflag.jpg
http://dingyue.ws.126.net/tMQpmh5oklnmnXzudKdLd8XgPAsC=y2Q8S95eX7bzq5cy1555813715475compressflag.jpg
http://dingyue.ws.126.net/6IzltRVEl2CZUEr4ugbhFvdeyEkYmZOBYPBGIF3o0sDwm1555813717131compressflag.jpg
http://dingyue.ws.126.net/xyDWBZrXEtmZ2La2G0Em4ZLcpPSHw73elvXdXUs8ApoEc1555813717880compressflag.jpg
http://dingyue.ws.126.net/30pQXwp4nmuPcRnWCLzZuAU4ZfZAlzbJnMykbg3beCrRY1555813718767compressflag.jpg
http://dingyue.ws.126.net/NffCSapkC3iTFq2TU1so0l09GkKkG1ns9h1wJXl1OmmWP1555813719705compressflag.jpg
http://dingyue.ws.126.net/NyghKat5TMgkIekY6PVJJ18F3j7gjp=0RImqVXc8Wd7KL1555813720439compressflag.jpg
http://dingyue.ws.126.net/qDEqUu8HtMgFaBVrrVOrTT39Nr9C=HHRhonlfgvmRDg3j1555813721360compressflag.jpg
http://dingyue.ws.126.net/6dP8vCvEtYYY7dgJ2vAVkNHarNeLA31Y=kTK=9NfcyiSj1555813722015compressflag.jpg
http://dingyue.ws.126.net/G5A2tBMYCsmVvkRVfUJeEfGGaGe41i6k5dQEeActoqinD1555813722916compressflag.jpg
http://dingyue.ws.126.net/0dD5h=Cf0wGLZSkHqDPCY3ZVGlLQvZW93t3fgPnPdKYp91555813723404compressflag.jpg
http://dingyue.ws.126.net/zuOf=E5lypPFN4GK2DJUcMqERA23gFretglW3o1iKLKv41555813724327compressflag.jpg
http://dingyue.ws.126.net/r=1r5GwkElcUycqg0TYQVUQ7UNC95HoWuQ0LNbN4Tmk2I1555813725172compressflag.jpg
http://dingyue.ws.126.net/4=5ru8B7YSEjlr7iSaIb4zG255g3O9Y9K2rkqTDOc7vfi1555813726286compressflag.jpg
http://dingyue.ws.126.net/CjCma8O07QeqfAQ9icGpvUBTdPq37oS6=ohwZVexUnYsO1555813726973compressflag.jpg
http://dingyue.ws.126.net/S2BX8Lzbyrre8Zwa3IaYkOwOJHK2C59RE3APRnKTVc6pR1555813727841compressflag.jpg
http://dingyue.ws.126.net/RcFymmiTeFLjuivCXcAH2XJljMbmqL8oxlr5dwQbDOH041555813728579compressflag.jpg
http://dingyue.ws.126.net/MJA=gk8usN5Usv3mcwBNEkjIA0MzmEUKLJFgEPXo5gjB81555813729260compressflag.jpg
http://dingyue.ws.126.net/WffDGpymPwjtE9xIuiL6Q1x2OywxyAxnWSjCBwuzYIeG21555813729919compressflag.jpg
http://dingyue.ws.126.net/qGprRXd8JLWdfi3BHUUUeEfnewgZulEshGR9lDTVJ3pwS1555813730527compressflag.jpg
http://dingyue.ws.126.net/sWiCFeGORrs2AN7oIt5xmej1XeaaRS4FKnXWlIO27q24q1555813731409compressflag.jpg
http://dingyue.ws.126.net/tKRgTp2v98UXx5dSiUmxVrSjx1mfId4I3IWWLn1E1Z83U1555813732216.jpg
";