f



Copy files with a .vbs file

Hi
Im a complete newbe at this and would like som help. Im sure this is very
easy to do but i dont have any idea as where to start.

I would like to have a .vbs file that i can click on to open e message box
where I can specify a file.
That file should then be copied 5 times and different text should be added
infront of the original file name, like this:

Org:
12324.txt

Result:
text1_1234.txt
text2_1234.txt
text3_1234.txt
text4_1234.txt
text5_1234.txt

Anyone who can help me with this or point me in the right direction?

Best regards
Daniel
-- 
--------------------------------------------------------
Daniel K�ster
TEKNOTRANS AB
Redegatan 13
426 77 V�stra Fr�lunda
Sweden
Tel: +46 31 69 47 60
Fax: +46 31 69 47 65
E-mail: dk@teknotrans.se
http://www.teknotrans.com


0
Daniel
10/30/2003 3:09:23 PM
comp.lang.basic.visual 1833 articles. 0 followers. please859 (33) is leader. Post Follow

1 Replies
494 Views

Similar Articles

[PageSpeed] 13

This should do the trick:

Set oFS = CreateObject("Scripting.FileSystemObject")

For i = 1 to 5
	Call oFS.CopyFile("12324.txt","text"+CStr(i)+"_1234.txt")
Next


"Daniel K�ster" <dk@dummymail.se> wrote in message news:<DQ9ob.31696$mU6.88153@newsb.telia.net>...
> Hi
> Im a complete newbe at this and would like som help. Im sure this is very
> easy to do but i dont have any idea as where to start.
> 
> I would like to have a .vbs file that i can click on to open e message box
> where I can specify a file.
> That file should then be copied 5 times and different text should be added
> infront of the original file name, like this:
> 
> Org:
> 12324.txt
> 
> Result:
> text1_1234.txt
> text2_1234.txt
> text3_1234.txt
> text4_1234.txt
> text5_1234.txt
> 
> Anyone who can help me with this or point me in the right direction?
> 
> Best regards
> Daniel
> -- 
> --------------------------------------------------------
> Daniel K�ster
> TEKNOTRANS AB
> Redegatan 13
> 426 77 V�stra Fr�lunda
> Sweden
> Tel: +46 31 69 47 60
> Fax: +46 31 69 47 65
> E-mail: dk@teknotrans.se
> http://www.teknotrans.com
0
asperamanca
11/4/2003 8:11:09 AM
Reply: