The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: microsoft.public.scripting.vbscript
From: "Pegasus [MVP]" <n...@microsoft.com>
Date: Wed, 28 Oct 2009 17:38:38 +0100
Local: Wed, Oct 28 2009 4:38 pm
Subject: Re: Renaming file as weekdays...
news:eoiC7R6VKHA.4484@TK2MSFTNGP02.phx.gbl...
> Hi, Here you go. I strongly recommend that you download the helpfile > I have a file called C:\MyDir\MyFile.dat which is copied to this folder > I need to keep a copy of this file for the seven last days. Hence I need > How would I do this in vbscript? I'm realtively new to this, but I want > thanks anyone > jake script56.chm from the Microsoft site. It contains examples for all the basic functions you need. sOldName = "d:\temp\MyFile.dat" sNewName = "d:\temp\" & WeekDayName(WeekDay(Date)) & ".dat" Set oFSO = CreateObject("Scripting.FileSystemObject") If Not oFSO.FileExists(sOldName) Then MsgBox "Cannot find " & sOldName WScript.Quit End If If oFSO.FileExists(sNewName) then oFSO.DeleteFile(sNewName) oFSO.MoveFile sOldName, sNewName You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||