ftpkalyan Posted May 26, 2010 Share Posted May 26, 2010 Please can someone tell me how to copy an application to another location which is coded in autoit. i need this because i am able to run the application from kixstart but not able to copy itself toa spicific folder. This application all does is to install antivirus product into the computers in a domain. Link to comment Share on other sites More sharing options...
niubbone Posted May 26, 2010 Share Posted May 26, 2010 It's just me or did someone else didn't got what this guy is saying? From the little I got, these should do the work: FileCopy for copying the file And to copy the autoit script you are running is @ScriptDir. Examples: FileCopy("C:\*.au3", "D:\mydir\*.*") or Filecopy FileCopy("@ScriptDir\Script.exe", "D:\mydir\Copy.exe") Link to comment Share on other sites More sharing options...
wakillon Posted May 26, 2010 Share Posted May 26, 2010 (edited) Hi ftpkalyan Try this ; @ScriptFullPath is the full path of your script or your compiled script. FileCopy ( @ScriptFullPath, "C:\new\", 9 ) 1 = overwrite existing files + 8 = Create destination directory structure if it doesn't exist Edited May 26, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
ftpkalyan Posted May 26, 2010 Author Share Posted May 26, 2010 why does the following line when executed creates two different sized files when executed Filecopy (@AutoItExe, "D:\wpkg\Copy.exe") First used F5 and got a biggger size file in the destination when compiled and run as an seperate exe its size is very less. Any clues!!!!!!! Link to comment Share on other sites More sharing options...
wakillon Posted May 26, 2010 Share Posted May 26, 2010 (edited) If you create destination folder before Filecopy ( @AutoItExe, "C:\wpkg\Copy.exe") give me only one file "Copy.exe" ! What's the interest to copy @AutoItExe file ? Sorry, but your request is not very clear... Edited May 26, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
BrettF Posted May 26, 2010 Share Posted May 26, 2010 Is it increasing by the same value each time? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
hawky358 Posted May 26, 2010 Share Posted May 26, 2010 why does the following line when executed creates two different sized files when executedFilecopy (@AutoItExe, "D:\wpkg\Copy.exe") First used F5 and got a biggger size file in the destinationwhen compiled and run as an seperate exe its size is very less.Any clues!!!!!!!Ok if I understand correctly.First file:When you are in Scite you press F5 then you have a file D:\wpkg\Copy.exe which is a certain size.Second File:You compile your .au3 and then run it you get D:\wpkg\Copy.exe which is a different size.The reason for this is that when you hit F5 in Scite, it just compiles and runs the file, but when you select compile you are using UPX compression which makes the file smaller. If you turn off UPX the file will be the exact size as when you use F5 in Scite Link to comment Share on other sites More sharing options...
ftpkalyan Posted May 27, 2010 Author Share Posted May 27, 2010 Ok if I understand correctly.First file:When you are in Scite you press F5 then you have a file D:\wpkg\Copy.exe which is a certain size.Second File:You compile your .au3 and then run it you get D:\wpkg\Copy.exe which is a different size.The reason for this is that when you hit F5 in Scite, it just compiles and runs the file, but when you select compile you are using UPX compression which makes the file smaller. If you turn off UPX the file will be the exact size as when you use F5 in SciteExactly, this is the reason for difference in file sizes. thanx for the clarification. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now