BillNewB Posted July 13, 2017 Share Posted July 13, 2017 I thought this would be simple. This script will copy the files, as long as the dest folder already exist. If the dest folder doesn't exist, then it just creates a file with the content of the 1st log in it. Also, it won't overwrite files. I've tried variations... Any help would be appreciated. FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*.*", "c:\ck\system_info\pw_logs\", $FC_OVERWRITE + $FC_CREATEPATH) FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*.*", "c:\ck\system_info\pw_logs\", '$FC_OVERWRITE + $FC_CREATEPATH' ) FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*.*", "c:\ck\system_info\pw_logs\", "$FC_OVERWRITE + $FC_CREATEPATH" ) Thanks... Link to comment Share on other sites More sharing options...
Neutro Posted July 13, 2017 Share Posted July 13, 2017 (edited) Hi Bill, Try this: FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*", "c:\ck\system_info\pw_logs\", 9 ) Edited July 13, 2017 by Neutro Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted July 13, 2017 Share Posted July 13, 2017 (edited) The argument 9 as Neutro posted should work. However its important to understand WHY. Did you view the help page for the command? https://www.autoitscript.com/autoit3/docs/functions/FileCopy.htm And generally when sharing its best to show the variable instead of the magic number. FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*", "c:\ck\system_info\pw_logs\", $FC_OVERWRITE + $FC_CREATEPATH) If you do not have it working, I would check permissions. Perhaps elevate your script and run it as admin. The largest glaring issue I see, and what is probably your problem is you have your arguments encapsulated in quotes, they should not be, as then your not resolving the variable and instead just telling autoit that its a string. Edited July 13, 2017 by ViciousXUSMC Neutro and JLogan3o13 2 Link to comment Share on other sites More sharing options...
Skeletor Posted July 14, 2017 Share Posted July 14, 2017 The reason for Neutro's 9 at the end of the script is because the two flags have been added together (1+8 = 9). See helpfile for the flags: $FC_OVERWRITE (1) = overwrite existing files $FC_CREATEPATH (8) = Create destination directory structure if it doesn't exist (See Remarks). You can also just use the following to copy all files into the folder: FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\", "c:\ck\system_info\pw_logs\", 9) Kind RegardsSkeletor "Coffee: my defense against going postal." Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen | Full Screen UI Link to comment Share on other sites More sharing options...
BillNewB Posted August 9, 2017 Author Share Posted August 9, 2017 These two worked: FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*", "c:\ck\system_info\pw_logs\", 9 ) FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\", "c:\ck\system_info\pw_logs\", 9) Thank you all for your help. With people like you around, I feel there's still hope for the world Neutro 1 Link to comment Share on other sites More sharing options...
benched42 Posted August 10, 2017 Share Posted August 10, 2017 It will work if you use the BitXOR function on the two copy parameters: FileCopy("c:\users\ckuser\documents\pixelwix pixelwarp evo\logs\*.*", "c:\ck\system_info\pw_logs\", BitXOR($FC_OVERWRITE, $FC_CREATEPATH)) Neutro 1 Who lied and told you life would EVER be fair? Link to comment Share on other sites More sharing options...
AspirinJunkie Posted August 10, 2017 Share Posted August 10, 2017 Where's the difference between BitXOR($FC_OVERWRITE, $FC_CREATEPATH) and $FC_OVERWRITE + $FC_CREATEPATH? The result is in both cases 9. Link to comment Share on other sites More sharing options...
benched42 Posted August 10, 2017 Share Posted August 10, 2017 I don't think there is a difference to the machine. I've had good luck using the BitXOR function and then listing all parameters within, especially when opening special types of forms with specific control boxes. Who lied and told you life would EVER be fair? 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