Jump to content

Search the Community

Showing results for tags 'filecopy'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 20 results

  1. Hi, Good Day! I have a problem and having difficulty implementing it. I want to copy the files in a certain folder, rename it, and when it exist in the destination folder it will add an index counter. Example source folder having files like: AA_123.TXT BB_123.TXT CC_123.TXT DD_123.TXT After file copy the target folder would be like this: 123.TXT 123_1.TXT 123_2.TXT 123_3.TXT How to achieve this? Thanks in advance
  2. Struggling to get Filecopy() working MsgBox(0,"Moving file: ", $fLine) ; C:\AlmeterS3\AI74_No2.csv FileCopy( $fLine, "C:\AlmeterS3\S3_Database\") ; FileCopy( $fLine, $BatchDir & "\S3_Database\") If @error Then MsgBox($MB_SYSTEMMODAL, "ERROR!", "database write error " & @error) EndIf FileDelete( $fLine) doesn't copy only creates a file "C:\AlmeterS3\S3_Database" (actually AI74_No2.csv) Again my typo I should have added $FC_OVERWRITE + $FC_CREATEPATH since folder didn't actually exist.
  3. Hi, I do recognize bad behaviour at this snippet: #include <AutoItConstants.au3> Global $g_sSD = @ScriptDir & "\" Global $g_sBurstPath = $g_sSD & "Burst\" DirCreate($g_sBurstPath) Local $sFileName = "Test_mit_3_Seiten.pdf" ; any PDF with more than 1 page inside @ScriptDir FileCopy($g_sSD & $sFileName, $g_sBurstPath & $sFileName, 1) ;~ Sleep(13000) Local $hTimer = TimerInit() ConsoleWrite("Start" & @CRLF) _Burst($g_sBurstPath & $sFileName) ; bursts PDF into single pages ;~ While _FileInUse($g_sBurstPat
  4. Hello guys, 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[0] _FileReadToArray($URL[$t], $LINE) For $u = 1 To $LINE[0] FileCopy($URL[$u], $DIR_DEST) Next Next the selected files via OpenFileDialog must be copied to the folder $DIR_DEST.
  5. Suppose you want from time to time to update a destination folder with new files that where created at a origin folder. It´s a kind of synchronization, where new files in origin must be "added" to destination. No worry about files that changed, just the new ones. The natural way: FileCopy ($originFolder & "\*.*" , $destinationFolder , $FC_NOOVERWRITE) After many tests, where I have 300 .jpg files in origin and no subfolders: If there is nothing at destination => OK, copy is done. Now destination has 300 files. If I erase at destination 10 files in
  6. I have a script which is copying one file (the latest file among a bunch of structured folders) from one network device to another network device. The weird thing is the file copied successfully to the destination folder right after the FileCopy command ran but the script is hanging for another few minutes until it return with exit code 0. Below is my script: #include <MsgBoxConstants.au3> #include <File.au3> #include <Array.au3> #include <FileConstants.au3> copyfile() Func copyfile() Local $testLogFile = FileOpen(@ScriptDir & "\CopyMSI
  7. 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, "Bo
  8. $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.
  9. 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! Backup.au3 Edit: DirCopy does pretty much the same
  10. Hello Experts, I am trying to create a script that will go onto my network and copy a word document to a local folder then open it. When I hard code the FileCopy, it works perfectly, but when I use variables for file path and file name, only the local folder I need gets created. I cannot seem to get the file to open even when using the hard coded path in function FileOpen code. Here is my code with comments on what is happening. #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> $ProductName = "Microsoft Word 2013" $AbvLanguage = "ENG" $Net
  11. 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 fil
  12. Hello, I have been having an issue with copying files from the current user's application data directory and then copying this in a temporary directory. The confusing thing is that when I look at my log that i had generated it tells me that the copy was successful. I have had previous issues with the FileCopy and DirCopy functions in the past. any ideas why or how I can copy these files successfully. I included a line from my script to give an idea what i'm trying to achieve. I have to retain the current XML file from the user profile and then copy this in to a temp director, then after the
  13. Good Morning, I was hoping to get some help with part of a script I am writing where you have an option to copy a file from a network share to the local C: drive. I have not found the solution, thus asking in the forums for some help, please. I have tried @HomeDrive, which, because I am part of a domain, shows the mapped drive letter not C:. I have tried @SystemDir but that takes me into the Windows folder. I have also tried mapped a drive letter to mycomputernameC$, all with no success. I can copy a file from the network share to a folder on C: but I would like to copy it to just C:. Any
  14. Hi guys, Maybe it's a stupid error, but really I can not find a solution. I have a txt with path of files, example: C:\Documents and Settings\Windows Xp\Desktop\autoit-v3-setup.exe C:\Documents and Settings\Windows Xp\Desktop\File.au3 C:\Documents and Settings\Windows Xp\Desktop\RecFileListToArray.au3 C:\Documents and Settings\Windows Xp\Desktop\SciTE4AutoIt3.exe The last line is empty. Now i want to copy the file and i have make this: $Log = FileRead(@WorkingDir & "\Final.txt") $aArray = StringSplit($Log, @LF) For $i = 1 To $aArray[0] -1 ; - 1 remove last empty line ;~ MsgBox(0,
  15. Hi, I am experiencing a strange issue with the FileCopy function. When I use FileCopy with the overwrite existing files flag, it creates a blank 0 byte file with the same name as the folder the file would reside if if the folder existed. For example: FileCopy("\\Server\share\acaddoc.lsp", "C:\Program Files\Autodesk\AutoCAD MEP 2011\", 1) This will create a blank 0 byte file named "AutoCad MEP 2011" on computers where that path does not already exist. I thought if the path does not exist, the function ends. Am I missing something?
  16. I am having trouble with this simple script. I have a lot of .pdf files that have a generated name. I want to replace them with a number from the document. I can get the number I want to use for the name by opening the .pdf, copying all the text (select all, copy) and converting that to an array. The number I want is always element 35 in that array. Here is my code #include <IE.au3> #include <Excel.au3> #include <Array.au3> #include <Date.au3> #include <File.au3> dim $aLines, $aColumns, $avData[1000][6] = [[0]], $aFile[1000] $FileList = _FileListToA
  17. Hi all, First of all, not sure whether to post this here or example scripts as although it works it does have a problem This is my first script I have made with AutoIT, its very basic but does some deployment tasks to make my life easier. Script: 2 Questions: 1, Why doesn't this part work? If the Computer has a floppy disk, the script still tries to read it even though I have specified no A:\ When it tries to read A:\ the files do not copy from the usb stick & then the script continues to add users to admins. ; Locate USB Drive & assigned drive letter, then cop
  18. Can someone tell me what is wrong with my syntax here ? RunAs("xxx", "xxxxxx", "xxxxxxx", 0, FileCopy & @LogonServer & "\netlogon\hosts_test c:\windows\system32\drivers\etc")
  19. Hi, I have written a scan utility that scans for certain items on the machine and upload the report to shared path The utility consists of 2 exe files 1) Scanner.exe: Scanner.exe will be running under local admin credentials. This exe does the following functions 1)Scans the machine 2)Write the report in 'C:report.txt' 3)Executes fileuploader.exe with runas function (using credentials which have access to shared path) 2) Fileuploader.exe: Copy 'C:report.txt' to shared path When I execute scanner.exe, the report gets generated, but not getting copied to the shared path. The same happens when
  20. I got this code which copies some files in my network to pcs with open office. Really useful if you got lots of pc's. How would I "display" a message that the file was copied successfully ? A bit lost since I use a case here. I know i could call the filecopy in a variable but since I verify if the os is windows 7, xp or 2k thats where I get lost a bit. like this but its not enough since i don't have my os verification going on : $variable = FileCopy ( $CompletePath & "mission" & $NextMis & ".mis", $CompletePath & "currentmis.mis",1 ) If $variable = 1 then ;Do something
  • Create New...