vbs scripting help

Acer Aspire 6930-6085 notebook
December 5, 2009 at 18:14:16
Specs: Windows 7
Alright here's what I have:

Dim fname
fname=InputBox("Enter the user to find:")

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("fname")
Wscript.Echo "Date created: " & objFile.DateCreated
Wscript.Echo "Date last accessed: " & objFile.DateLastAccessed
Wscript.Echo "Date last modified: " & objFile.DateLastModified
Wscript.Echo "Size: " & objFile.Size

Well it's not working, I've been trying so hard to get it to find the file I input.

Also I want to set the directory to "characters" and run this in the current directory with a folder named "characters" So if I type in, "123.txt" it will access the "characters" folder and retreive file information about the date of the file 123.txt.

So far the search for the file won't work, it keeps saying my file name couldnt be found I tried it in the current directory and finding names it isn't working.

Please help!

See More: vbs scripting help

Report •

December 5, 2009 at 22:53:19
Set objFile = objFSO.GetFile("characters\" & fname)

Report •
Related Solutions

Ask Question