6 posts in this topic
I'm working on this script:
Case $BTN Global $URL = FileOpenDialog("IMPORT FILE", $DESKTOP, "ALL FORMAT (*)", 4) $DIR_DEST = "C:\DIR-WORK\list\IMPORT_DOC\" DirCreate($DIR_DEST) Local $LINE For $t = 1 To $URL _FileReadToArray($URL[$t], $LINE) For $u = 1 To $LINE FileCopy($URL[$u], $DIR_DEST) Next Next the selected files via OpenFileDialog must be copied to the folder $DIR_DEST.
OK, so i run out of ideas how to make this working. Basically my FIleCOpy statement doesn't do it job. I must be missing something. Here is my code:
#RequireAdmin . . Local $fTasks = "C:\Drivers\Other\Tasks\" Local $fTasksSys = "C:\2\" . . . FileCopy(GUICtrlRead($fTasks) & "Win10_CNC_Setup", $fTasksSys, 8) MsgBox(0, "Boot Setting", "Copied Tasks." & $fTasks & "Win10_CNC_Setup" & @CR & "To " & $fTasksSys) FileDelete($fTasksSys & "ADxLR5_StartUp") MsgBox(0, "Boot Setting", "Deleted tasks.") while it is finally creating folder called "2" it does not want to copy files. Files are .xml but without extension one of the is called: "Win10_CNC_Setup".
Another thing is I don't understand why this
$FC_OVERWRITE + $FC_CREATEPATH doesn't work but if i replace it with this
8 it does create folder.
Main question is - how to make it copying files?
$RootDir = "C:\x86\" $BinariesFolder = "C:\Binaries\x86\0717-15.Binary.r9642_Release_win32_Fresh" $DestinationFolder = $RootDir & "_AppFiles-Telos" $SourceFolder=$BinariesFolder FileCopy($SourceFolder & "\*.*", $DestinationFolder & "\", $FC_OVERWRITE + $FC_CREATEPATH) In the above code, even if I keep $FC_OVERWRITE, the existing files are not getting replaced.
Any suggestion please.
I'm writing a small program for creating a backup. I want to do that by using FileCopy. Everything from drive C should be copied to drive D.
FileCopy("C:", "D:", $FC_OVERWRITE + $FC_CREATEPATH) That doesn't do anything, though. I played a bit with the paths, but nothing does what I want. Sometimes only the folder of the program itself is copied, sometimes nothing is copied.
What am I doing wrong? What do I have to do that everything from C goes to D? Thanks!
Edit: DirCopy does pretty much the same
Hi from Bordeaux, France ! how are you today ?
I had a problem with filecopy function.
I have a folder with my gifs on a network folder. At the start of my program, i want to make a copy on local pc. Not much complicated.
If i do :
FileCopy(SOURCE ,DESTINATION, $FC_CREATEPATH) It does'nt work. My destination folder is not empty and contains file which are even present in the source. I would like that filecopy add new file from the source to the destination, without overwrite. But it does'nt work.
If i do:
FileCopy(SOURCE ,DESTINATION, $FC_OVERWRITE+ $FC_CREATEPATH) This overwrite with all files.
So i do that, because it works...but if i only want to copy new file how can i do ?
CopierDossierImage() Func CopierDossierImage() $DossierImagesReseau = "\\sw3308\IntranetSTC\Hors Web\Logiciels STC\Barre STC\images\" $DossierImagesLocal = $DossierBarreSTC & "\Images\" FileCopy($DossierImagesReseau & "*.*", $DossierImagesLocal, $FC_OVERWRITE+ $FC_CREATEPATH) EndFunc ;==>CopierDossierImage