Hi, this is probably super simple but i'm still a newb..
Anyway, i'm trying to get the current directory that the VBScript is running from... I saw something akin to:
Server.MapPath(".")
but umm.. I'm not doing this for ASP or any web stuff, i'm trying to copy files from the current directory ..it's just I can't get the current directory...
Function CopyFile(sFilePath,sFileName,bOverwrite)
Dim fso, folder
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(sFilePath, sFileName) Then
WScript.Echo "She exists!!"
Else
' WScript.Echo "She no exists :<"
End If
End Function
Call CopyFile("\","blah.txt",True)
---
Is about what I have..except the "\" doesnt' work neither does "." and i'm not sure what else to try....
Thx
Frank
Anyway, i'm trying to get the current directory that the VBScript is running from... I saw something akin to:
Server.MapPath(".")
but umm.. I'm not doing this for ASP or any web stuff, i'm trying to copy files from the current directory ..it's just I can't get the current directory...
Function CopyFile(sFilePath,sFileName,bOverwrite)
Dim fso, folder
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(sFilePath, sFileName) Then
WScript.Echo "She exists!!"
Else
' WScript.Echo "She no exists :<"
End If
End Function
Call CopyFile("\","blah.txt",True)
---
Is about what I have..except the "\" doesnt' work neither does "." and i'm not sure what else to try....
Thx
Frank