Sign in to follow this  
Followers 0
Silvinho

create directory and to copy files

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0