PDA

View Full Version : COPY



oleg_v
09-13-2010, 05:59 AM
Hi
I need help with a macro
to copy the file in the particular folder 100 times without openning it just copy it self with
names of "xxx1.txt",xxx2.txt and so on.
I am sorry that i do not have any sample for it.

Thanks

arangogs
09-13-2010, 06:33 AM
I think this is what you are looking for mate.


for i = 2 to 100
FileCopy "xxx1.txt", "xxx" & i & ".txt"
next i

oleg_v
09-13-2010, 06:41 AM
hi
thanks
where do i specify the file location?

oleg_v
09-13-2010, 06:47 AM
i can not get it to work
i do not see any results in the location folder

arangogs
09-13-2010, 06:49 AM
Hi Oleg,
you will need to add the file path:



For i = 2 To 100
FileCopy "C:\yourFileLocation\xxx1.txt", "C:\myTestFiles\xxx" & i & ".txt"
Next i