Results 1 to 3 of 3

Thread: Bat Commands In VB/ VB Equivalent??

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2009
    Location
    England
    Posts
    38

    Question Bat Commands In VB/ VB Equivalent??

    Hi All,

    Im trying to make a simple program which changes the files properties and was wondering how i would make this code:

    Code:
    @echo off
    title File Changer
    :menu
    echo [ Menu ]
    echo H to Hide the File
    echo S to Show the File
    set /p f=File Name: 
    set /p c=Option: 
    if %c%==h goto h
    if %c%==H goto h
    if %c%==s goto s
    if %c%==S goto s
    :h
    echo Hiding File...
    attrib %f% +s +h
    cls
    goto menu
    :s
    echo Showing File...
    attrib %f% -s -h
    cls
    goto menu
    to work in vb, or change it to a Equivalent vb code.

    Any Idea's?

    Thanks,

    Jamie.

  2. #2
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Bat Commands In VB/ VB Equivalent??

    1. Start a new VB Project. Form1 is added by default.
    2. Put one radiobutton / checkbox for each option you want.
    3. Add a textbox to accept filename.
    4. Put a command button. Change its Text property to "OK"
    5. Code the command button click event that changes the file attributes. You can use the System.IO.FileInfo class to do this. It has an Attributes properties which you should set appropriately.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2009
    Location
    England
    Posts
    38

    Re: Bat Commands In VB/ VB Equivalent??

    ty soz for late reply all working =P

Posting Permissions

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



Click Here to Expand Forum to Full Width