Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[37] Files and Folders

Last post 11-09-2005 1:04 AM by tieungao35. 22 replies.
Page 2 of 2 (23 items) < Previous 1 2
Sort Posts: Previous Next
  • 12-13-2004 8:07 AM In reply to

    • jschin
    • Not Ranked
    • Joined on 12-13-2004
    • New Member
    • Points 10

    Getting Directory Path as Variable

    I'd like to allow a user to select a directory path, then parse a bunch of files in that directory. I have the parsing part down, and I can hard code a directory in just fine, however I need to enable people to select a directory in order to make this mini-app useful.

    ...My issue is two fold,

    1. I need direction as to how to create a form in VB that will give users the ability to select a directoy. (I am new to vb, and not sure where to start. I am not asking anyone to do it for me, but if you could point me to a tutorial, example online that would help it'd be great.

    2.  I am using the ".LookIn = """ command to specify a directory right now. I am having problems specifying a variable (E.g. Dir = "C:/folder/subfolder", then .LookIn = Dir) doesn't seem to work) Any ideas as to why?
    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 12-13-2004 9:41 AM In reply to

    • jschin
    • Not Ranked
    • Joined on 12-13-2004
    • New Member
    • Points 10
    Ok, for those of us who are begining like me, I was able to find my mistake for number 2.  I simply had the syntax mixed up for the Dir function..I thought I could use it as a variable name...I was wrong.

    Dim fp ' declare my variable that I want to use for the directory

    fp = Dir("C:\work\venturaModify\06144") ' Set the variable equal to "a directory. This is where I am trying to make the user select this path, instead of me hardcoding it in.

    ...further into the "FileSearch" function I set the directory like this:

    .LookIn = Dir(fp)

    ...I am still struggling with my forms..I went through the tutorial by James, but haven't found anything online about selecting a Path via a form I can create.

    .-j
    • Post Points: 0
  • 02-24-2005 3:12 PM In reply to

    Making Directories

    I've been able to follow your examples regarding making directories and renaming.

    I would like to know two more things.

    One: How do I check for a directory?
    Reason: I am developing a database that will need to check for a directory's existance using the current month's name as its lable. If the a directory does not exist with the current month's name - I will have code automatically create a new directory using the current month's name each time a new calendar month begins and identified by the system.

    Two: Can I use wild cards? Basically can I do the following in VBA -

    FileCopy "C:\Foldername\*.*", "D:\DifferentFoldername\*.*"

    Thanks

    Greg
    • Post Points: 0
  • 03-20-2005 9:07 PM In reply to

    • po_tph
    • Not Ranked
    • Joined on 03-27-2004
    • New Member
    • Points 20

    hide folder source code???

    can anybody plz help me i want to have a sourcec code of hidng folders in windows directory.thanks
    • Post Points: 0
  • 03-20-2005 9:19 PM In reply to

    • po_tph
    • Not Ranked
    • Joined on 03-27-2004
    • New Member
    • Points 20
    do you a source code of hing folders???
    • Post Points: 0
  • 07-07-2005 10:23 PM In reply to

    Copying folders including subdirectories

    I am using deppfreeze in my internet cafe.This program protects hard drive from every changes and does not allow save games.When computer restarted all saves dissapear from hard drive.I know the games save directories and i need visual basic code that copies all files in directory to server.Code must overwrite and must include subdirectories.As msdos command does :

    xcopy C:\Program Files\Call of Duty\Main\save\*.*  \\server\saves\call of duty /e/y

    (/e/y parameter is for overwrite and include subdirectory)

    Can anyone help me.Thnx.
    • Post Points: 0
  • 09-26-2005 6:17 PM In reply to

    INI files

    Hello,

    the article of James is not state of the art.
    To import win32 functions is not the way how you should work with the .NET framework. With a little bit pation you can write a own managed code assemby for INI Files.

    Tom
    • Post Points: 0
  • 11-09-2005 1:04 AM In reply to

    help

    Hi all,
    I am a new beginner of Visual basic 6. Even though i read James's article, i don't know how to create a project and add his code as a new module.
    Could you please show me how to create 1 project has 1 command button and 1 optionbox only? Also how to add James' s code to that project?Thanks for your time and understanding.
    PS: tieungao35@yahoo.com
    • Post Points: 0
Page 2 of 2 (23 items) < Previous 1 2