Silvinho Posted February 19, 2008 Share Posted February 19, 2008 How to create the following directory structure automatically? c:\Artefato Inspecionado\PCC \IPU \ECP and in these directories I want to copy three files .xls that are in other directory in the following way: c:\templates pcc.xls ipu.xls ecp.xls Link to comment Share on other sites More sharing options...
Squirrely1 Posted February 19, 2008 Share Posted February 19, 2008 Please look at the AutoIt help file under "FileCopy" where it says this about the flag:8 = Create destination directory structure if it doesn't exist (See Remarks).Then, remember to not start two instances of the same topic, one right after the next. Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
SiteMaze Posted February 19, 2008 Share Posted February 19, 2008 Here is my dumd and straight way. If Not FileExists("c:\Artefato Inspecionado\PCC") Then If DirCreate("c:\Artefato Inspecionado\PCC") == 0 Then _MsgBox ("OK", "Warning", "Error encountered creating the log directory") Else FileCopy("c:\templates pcc.xls","c:\Artefato Inspecionado\PCC\templates pcc.xls") EndIf EndIf If Not FileExists("c:\Artefato Inspecionado\IPU") Then If DirCreate("c:\Artefato Inspecionado\IPU") == 0 Then _MsgBox ("OK", "Warning", "Error encountered creating the log directory") Else FileCopy("c:\templates pcc.xls","c:\Artefato Inspecionado\PCC\templates pcc.xls") EndIf EndIf If Not FileExists("c:\Artefato Inspecionado\ECP") Then If DirCreate("c:\Artefato Inspecionado\ECP") == 0 Then _MsgBox ("OK", "Warning", "Error encountered creating the log directory") EndIf EndIf Something like this, creating the directory and copying the files. Arsenal Football Fan Club in Singapore 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