/build/static/layout/Breadcrumb_cap_w.png

Need Vbscript help

Hi Everyone,

I need a vbs which would search for a file given as an input by the User and then retrieve the details of that file like its size,version, date modified,created and acceessed. Then it should write these results to an output file. Any help is appreciated

Regards,
Harie

0 Comments   [ + ] Show comments

Answers (6)

Posted by: pjgeutjens 14 years ago
Red Belt
0
for inspiration:

Set objArgs = WScript.Arguments

Function ShowDateCreated(filespec)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
ShowDateCreated = f.DateCreated
End Function
Posted by: anonymous_9363 14 years ago
Red Belt
0
Getting the file version isn't as simple as it sounds, since - bizarrely - the FileSystemObject object has no native property for file version.

There is a file property class file on JSWare (http://www.jsware.net). I have just used (my edited version) in a log-in script addition for my current client, where the script needed to branch according to a DLL version difference.

As for the script you require, PM me with the details and I'll send you a quote. Since I expect that that will never happen, you should probably visit http://www.computerperformance.co.uk, download samples of scripts which perform the separate functions that you want (i.e. file search, results output, etc.) and then build a script which combines them.

EDIT:
BTW, it's probably not the best idea to use your email address as a 'nickname' on a public forum. Unless you sell anti-spam software, of course...
Posted by: pjgeutjens 14 years ago
Red Belt
0
Getting the file version isn't as simple as it sounds, since - bizarrely - the FileSystemObject object has no native property for file version.

there is a FileSystemObject.GetFileVersion(path) method that returns the version of a file.

PJ
Posted by: anonymous_9363 14 years ago
Red Belt
0
So there is! http://msdn.microsoft.com/en-us/library/b4e05k97%28VS.85%29.aspx How did I miss that? :)

What I should perhaps have said was that the 'File' object has no native property. That's where one would expect it, anyway.
Posted by: hari.ram66@gmail.com 14 years ago
Senior Yellow Belt
0
hEY GUYS.. THANKS.. SORRY FOR THE DELAYED REPLY.. WAS WORKING ON A DIFFERENT PROJECT AND WAS AWAY ON A LONG LEAVE.. Thanks once again.. will try combining the inputs given n will get back to u tomorrow..

@vbscab: even i dont want to use my email id.. its got registered that way.. am not able to change it now..:-( :-( :-(
Posted by: anonymous_9363 14 years ago
Red Belt
0
1. It got registered that way because you entered it as your nickname; and
2. With only 8 posts so far, why not simply abandon this ID and register a more anonymous one?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ