PDA

View Full Version : Files Copier



zak
11-05-2011, 15:01
i have used the youTube files copier example posted by Petr here http://www.thinbasic.com/community/showthread.php?11099-YouTube-Files to copy a huge number of pictures from a too complex encyclopedia folder which have many folders inside, and i don't want to copy thumbnail pictures so i have restricted copying to the files which have sizes more than 10kb, i just made slight modification to to copy the files with the .jpg extension. below is the slight modifications, so we can consider this example as a great files copier:



startDir = "your folder"

nItems = DIR_ListArray(Files, lDir, "*.jpg", %FILE_NORMAL Or %FILE_HIDDEN Or %FILE_SYSTEM Or %FILE_ADDPATH)


'if file size > 10KB then copy it
If FILE_Size(FileName) > 10000 Then
FILE_Copy(FileName, foundVideosDirectory+"Image"+Format$(videosFound, "000")+".jpg")
EndIf
PrintL "Copy finished..."


i have posted this for those who may missed that great utilitiy. i am using it every day to copy youTube videos, and now to copy any files from a complex folders.