Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Unanswered: FilesystemObject

    Dose anyony know which Preferences should be chosen to accessScripting.FilesystemObject?
    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    I use Access 2000 and I haven't set any preferences for scripting ? Where are you looking for these ? I dont think there are any references either.

    I use it to get the fileopen Dialog, check and manipulate files, and recently (not advised) to do stuff to my registry.

    kind of like :



    Set fs = CreateObject("Scripting.FileSystemObject")
    fs.deletefile StrInputFileName



    Stuff like that ?

    I wish I could help you , you have helped me so often.

    Ken

  3. #3
    Join Date
    Mar 2004
    Location
    Berlin, Germany
    Posts
    107

    Re: FilesystemObject

    Originally posted by hammbakka
    Dose anyony know which Preferences should be chosen to accessScripting.FilesystemObject?
    Thanks
    Try Microsoft Scripting Runtime (system32\scrrun.dll). It allows you to access all components of te FileSystemObject while editing your code.

    Cheers

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Thank you both of your reply, you are right, you don't need to set any preferences. I wrote some code and get an error

    Dim fs As Object
    Dim drv, fol
    Set fs = CreateObject("scripting.filesystemobject")
    Set drv = fs.drives("C")

    Till here there is no problem


    Set fol = drv.folders("\Temp")

    then it said
    ("Object does not afford this method or property")

  5. #5
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    Does this help ?


    Dim fs As Object
    Dim drv, fol
    Set fs = CreateObject("scripting.filesystemobject")
    Set drv = fs.drives("C")


    Set fol = fs.getfolder("c:\ken")



    This sets the Fol to ken on the C drive, you can also use getspecialfolder

    Still trying !

    Ken

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Ken,
    Thank you very much, it functions, using the GetFolder() method.

  7. #7
    Join Date
    Feb 2004
    Location
    Dorset UK
    Posts
    147
    No problem at all, it makes a change me able to help you.

    I finally did something helpful !

    Its a good feeling.

    Ken.

    Also found this, I knew I had it somewhere:

    http://www.devguru.com/Technologies/...temobject.html

    Its a list of stuff that might help further.
    Last edited by Ken_Hart; 03-29-04 at 09:05.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •