Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

how to copy a director

$
0
0
I am leaving work for the weekend but thought I would post this. I cannot get a directory to FULLY copy all contents across a network. I can make a folder and name it (not the AutoIT way I know). When this script runs, it gets the files from the "BUMPER"  folder just fine, but every folder after that does NOT copy the contents. Any ideas from a kind soul would be appreciated.



[ autoit ]    ( ExpandCollapse - Popup )
#include #include Local $FileList = _FileListToArray("\\10.10.10.10\Incoming Projects DAW1\Promos\Open PM") For $i = 1 To $FileList[0] ; As explained the [0] element holds the count If StringInStr($FileList[$i], "Bumpers EXPORTS") Then ; Does the name hold the string "Promo"? $export_folder1 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" DirCreate ( $dest & $export_folder1 ) EndIf If StringInStr($FileList[$i], "NDP EXPORTS") Then ; Does the name hold the string "Promo"? $export_folder2 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" DirCreate ( $dest & $export_folder2 ) EndIf If StringInStr($FileList[$i], "OPEN EXPORTS") Then ; Does the name hold the string "Promo"? $export_folder3 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" DirCreate ( $dest & $export_folder3 ) EndIf ;======================================== If StringInStr($FileList[$i], "Bumpers EXPORTS") Then ; Does the name hold the string "Promo"? $source1 = "\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM\" $export_folder1 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" MsgBox(8192, "Bumper", $source1 & $export_folder1) DirCopy ($source1 & $export_folder1,$dest & $export_folder1,1 ) EndIf If StringInStr($FileList[$i], "NDP EXPORTS") Then ; Does the name hold the string "Promo"? $source1 = "\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM\" $export_folder2 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" MsgBox(8192, "NPR", $source1 & $export_folder2) DirCopy (($source1 & $export_folder2),($dest & $export_folder2),1 ) EndIf If StringInStr($FileList[$i], "OPEN EXPORTS") Then ; Does the name hold the string "Promo"? $source1 = "\\10.10.44.37\Incoming Projects DAW1\Promos\Open PM\" $export_folder3 = $FileList[$i] $dest = "C:\Documents and Settings\sebrad\Desktop\Open PM3\" MsgBox(8192, "OPEN", $source1 & $export_folder3) DirCopy (($source1 & $export_folder3),($dest & $export_folder3),1 ) EndIf Next

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>