March 01, 2021, 10:39:54 PM

Author Topic: [bb] CopyDirectory([From], [To]) by ShadowTurtle [ 1+ years ago ]  (Read 570 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : CopyDirectory([From], [To])
Author : ShadowTurtle
Posted : 1+ years ago

Description : Have fun :)

cu, ST.


Code :
Code: BlitzBasic
  1. Function CopyDirectory(From_$, To_$)
  2.   Local MyDir, MyFile$
  3.  
  4.   MyDir = ReadDir(From_$)
  5.   MyFile$ = NextFile$(MyDir)
  6.   MyFile$ = NextFile$(MyDir)
  7.   Repeat
  8.     MyFile$ = NextFile$(MyDir)
  9.     If MyFile$ = "" Then Exit
  10.  
  11.     If FileType(From_$ + "" + MyFile$) = 2 Then
  12.       CreateDir To_$ + "" + MyFile$
  13.       CopyDirectory(From_$ + "" + MyFile$, To_$ + "" + MyFile$)
  14.     Else
  15.       CopyFile From_$ + "" + MyFile$, To_$ + "" + MyFile$
  16.     End If
  17.   Forever
  18.   CloseDir(MyDir)  
  19. End Function


Comments :


ShadowTurtle(Posted 1+ years ago)

 yeah.. latest tech. written in basic..


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal