2

I need to access file information such as file size.

I can create the ActiveXObject:

ActiveXObject fileSystem = new ActiveXObject("Scripting.FileSystemObject");

But now, how should I access the methods for FileSystemObject?

Thanks!

2 Answers 2

1

Look at the Script.Windows.dll assembly - the import library has already been created - and comes along with Script#.

Also look at the Script Gadget project template - it includes some bootstrapper script that goes hand-in-hand with Script.Windows.dll ... basically a script-friendly wrapper for doing the equivalent of new ActiveXObject("Scripting.FileSystemObject").

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

0

You'll need to create an import library that defines what methods are available to the Scripting.FileSystemObject class.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.