Tripredacus Posted May 8, 2007 Posted May 8, 2007 I can't seem to copy a folder properly. I am likely using the wrong path syntax. This is a test app. $FolderPath = @UserProfileDir & "\Desktop\Chipset Drivers\*.*" FileCopy ( "\\server\folder\folder\*.*", $FolderPath ) Run("Explorer.exe " & @UserProfileDir & "\Desktop\Chipset Drivers") MsgBox(4096,"Variable test",$FolderPath) The variable comes up with the right information, but it isn't copying the folder and all of its contents. It doesn't matter what path I put in there either. When the Explorer part runs, it says it can't find the folder, but even Beta Run does not show me any errors. Twitter | MSFN | VGCollect
Xenobiologist Posted May 8, 2007 Posted May 8, 2007 Hi, from help: ; Method to copy a folder (with its contents) DirCreate("C:\new") FileCopy("C:\old\*.*", "C:\new\") You neendn't the *.* when copying content. so long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Danny35d Posted May 8, 2007 Posted May 8, 2007 Be sure the target path exists (@UserProfileDir & "\Desktop\Chipset Drivers) or add to FileCopy flag 8 to create destination folder. FileCopy ( "\\server\folder\folder\*.*", $FolderPath, 8) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Tripredacus Posted May 9, 2007 Author Posted May 9, 2007 Yes this allowed my test to work. I won't be able to test it using real code until the next No-OS build comes through. The actual code (which I removed) copies a folder over and runs a program, then deletes the folder afterwards. That may present problems in the future but we shall see. Twitter | MSFN | VGCollect
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