0 pts.
 HELP – VBScript
Hello I need a help in copying a file and renaming at the destination. I am using vbscript. Here is the situation. I have a file test.dat generated on a daily basis and sitting in the 3 different directories and the directories are 20070901, 20070902 and 20070903. I have to copy this file to a destination folder \dest and rename their as test1.csv, test2.csv and test3.csv. How can I do this? any help will be appreciated. Thx,

Software/Hardware used:
ASKED: October 17, 2007  7:51 PM
UPDATED: February 1, 2008  2:24 AM

Answer Wiki:
By using the copy method. <pre>Dim filesys,demofile, createdate Set filesys = CreateObject("Scripting.FileSystemObject") set demofile = filesys.GetFile("c:somefile.txt") demofile.Copy("c:projectssomeotherfile.txt") </pre>
Last Wiki Answer Submitted:  February 1, 2008  2:24 am  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _