home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / FileCopy.au3 < prev    next >
Encoding:
Text File  |  2006-06-17  |  714 b   |  16 lines

  1. FileCopy("C:\*.au3", "D:\mydir\*.*")
  2.  
  3. ; Method to copy a folder (with its contents)
  4. DirCreate("C:\new")
  5. FileCopy("C:\old\*.*", "C:\new\")
  6.  
  7. ; Do not overwrite but create directory structure if it doesn't exist
  8. FileCopy("C:\Temp\*.txt", "C:\Temp\TxtFiles", 8)
  9. ; FALSE - 'TxtFiles' works here like a single file name (like DOS "copy file1 + file2 +...")
  10.  
  11. FileCopy("C:\Temp\*.txt", "C:\Temp\TxtFiles\", 8)
  12. ; RIGHT - 'TxtFiles' is now the target directory and the file names are given by the source names
  13.  
  14. FileCopy("C:\Temp\*.txt", "C:\Temp\TxtFiles\", 9) ; Flag = 1 + 8 (overwrite + create target directory structure)
  15. ; Copy the txt-files from source to target and overwrite target files with same name
  16.