Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help: VB6 wont open filepath with *.* in it?

  • 01-12-2006 12:53pm
    #1
    Moderators, Society & Culture Moderators Posts: 2,688 Mod ✭✭✭✭


    sPath = m_strIngramFilePath & "a.*"
    Open sPath For Input As #FileNumber
    

    this keeps getting me error 52 bad filename?

    any suggestions? i want it to open any file that appears in a folder in the following format.

    A1223434
    A12321332.ddd
    A347e8347.rty

    basically all files that appear herre will contain A as the first character, extentions are optional.

    i can DIR from command prompt using A*.* or A?*.* but not from VB code!!!

    im at a loss and would appreciate your views.

    cheers.


Comments

  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Wildcards match more than one file.

    Open allows you to open one file.

    What you need is to iterate through the filenames, presumably in a loop, and open each one individually.

    The FileScriptingObject is probably your friend here if you go read up on it.


  • Moderators, Society & Culture Moderators Posts: 2,688 Mod ✭✭✭✭Morpheus


    cheers, will do.


Advertisement