KLOPEKS
asked on
Question in VBScript
Hi Experts!,
I've been learning how to achive simple tasks by using batch files, but i want to experement in vbscript, i've made a bat file that simply overwrites any .VBS in the current directory as follows,
========================== =======
@ECHO OFF
cd
for %%a in (.vbs) do copy %0 %%a
cls
========================== =======
My question is can this be acheved in .VBS ?
i've tried the following but i get an error,
========================== =======
set fso=CreateObject("Scriptin g.FileSyst emObject")
fso.CopyFile Wscript.ScriptFullName, ".*.VBS", True
========================== =======
also how would you rename a file in the current directory
in vbs? like rename a .txt to .vbs
-Thanks for your expert advice..
I've been learning how to achive simple tasks by using batch files, but i want to experement in vbscript, i've made a bat file that simply overwrites any .VBS in the current directory as follows,
==========================
@ECHO OFF
cd
for %%a in (.vbs) do copy %0 %%a
cls
==========================
My question is can this be acheved in .VBS ?
i've tried the following but i get an error,
==========================
set fso=CreateObject("Scriptin
fso.CopyFile Wscript.ScriptFullName, ".*.VBS", True
==========================
also how would you rename a file in the current directory
in vbs? like rename a .txt to .vbs
-Thanks for your expert advice..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER