I found my own answer after some trial and error.
Hope it helps somebody else out
This is a batch file that takes that text file, or any file really, renames it then moves it to the shared location, then deletes the original file
echo on
ren c:\folder\new.txt new%date:~4,2%%date:~7,2%%date:~10,4%.txt
copy “C:\folder\new%date:~4,2%%date:~7,2%%date:~10,4%.txt” “\\servershare\folder1\folder2”
echo y | del “c:\folder\*”
———-
Your original script would have worked with some small modifications:
<pre>Dim objFSO, todaysDate, newname
todaysDate= date()
newname = “\\networkshare\report” & right(day(todaysDate)+100,2) & right(month(todaysDate)+100,2) & year(todaysDate) & “.rtf”
set objFSO = CreateObject(“Scripting.FileSystemObject”)
objFSO.MoveFile “C:\report.rtf” , newname</pre>
Discuss This Question: