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.
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.
Re: Bat Commands In VB/ VB Equivalent??
ty soz for late reply all working =P