Background Copy

Windows specific forum
trather
User
User
Posts: 29
Joined: Sun Nov 07, 2004 9:57 pm

Background Copy

Post 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.
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post 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
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post 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
Post Reply