Page 1 of 1

Background Copy

Posted: Tue Oct 04, 2005 6:21 am
by trather
Droopy,
I like your lib and the background transfer is great for files. Is there a way to make this work for whole folders or whole directories. What I am trying to do is copy the my documents and all sub folders from my users to a backup location. If I can do this in the background then I can set it up on a schedule and they will not know that it has happen.

Posted: Tue Oct 04, 2005 8:26 am
by Droopy
Background just copy one file at each time, you must create your own function.
You can call SearchFiles function, that call Background function

Posted: Tue Oct 04, 2005 8:27 am
by Droopy
The next release of SearchFiles can search for Subdir if you want

Code: Select all

;- SUPER PRATIQUE !!
;/ SubDir specify if you want scan SubDirectories

ProcedureDLL SearchFilesInit(Path.s,Mask.s,SubDir) ; SubDir = 1 / 0 without SubDir
  
  ;- Return the number of files found in the LinkedList
  
  ; Create or Clear the LinkedList
  Static Flag.l
  If Flag=0
    NewList Fichiers.s()
    Flag=1
  Else
    ClearList(Fichiers())
  EndIf
  
  SearchFiles(Path,Mask) ; Car le répertoire lui même n'est pas scanné sinon
  If SubDir
    SearchDirectory(Path,Mask)
  EndIf
  
  ProcedureReturn CountList(Fichiers()) 
EndProcedure