Google Answers Logo
View Question
 
Q: in my project VB.60, I need the command how to unhide hidden folder on diskette ( No Answer,   3 Comments )
Question  
Subject: in my project VB.60, I need the command how to unhide hidden folder on diskette
Category: Miscellaneous
Asked by: yana-ga
List Price: $2.00
Posted: 20 Oct 2002 14:17 PDT
Expires: 19 Nov 2002 13:17 PST
Question ID: 85586
Hi! my Question ID is 85151 and I did not get the answer ... Please
help me
My Question is:
How I can unhide hidden folder on Floppy Diskette in My project of
Visual Basic 6.0. When I click on DriveListBox "A:\" I see no folder ,
so I know that folder on Diskette but it is a hidden folder.
                                         Thanks, Michael Ray

Request for Question Clarification by blinkwilliams-ga on 20 Oct 2002 14:43 PDT
Have you tried going to Windows Explorer and selecting
"view"-->"folder options", selecting the "view" tab and selecting
"show all files" under hidden files?
Answer  
There is no answer at this time.

Comments  
Subject: Re: in my project VB.60, I need the command how to unhide hidden folder on diskette
From: slawek-ga on 20 Oct 2002 17:10 PDT
 
Here is something that will help you in any DOS style environment:

Open a DOS prompt, type: A: and hit enter.
Once you are at drive A:, type: "attrib -r -s -h -a *.*" and hit
enter. This will unhide all files, and take off all the attributes.

If this is an acceptable answer, please let me know and I will post an
official answer.

Thank you.
slawek-ga
Subject: Re: in my project VB.60, I need the command how to unhide hidden folder on diskette
From: yana-ga on 21 Oct 2002 01:19 PDT
 
Hi! Please read this :

All I need the code, how to unhide hidden folder on "FLOPPY DISKETTE"
in this Project..
                                                     ****************

Please Help Me to resolve the problem. I will send this message for
the last time.
    
Private Declare Function GetDriveType Lib "kernel32" _
        Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Declare Function GetDiskFreeSpace Lib "kernel32" _
        Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _
        lpSectorsPerCluster As Long, lpBytesPerSector As Long, _
        lpNumberOfFreeClusters As Long, _
        lpTtoalNumberOfClusters As Long) As Long
Private Declare Function GetCurrentDirectory Lib "kernel32" _
        Alias "GetCurrentDirectoryA" (ByVal lpBufferLength As Long, _
        ByVal lpBuffer As String) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" _
        Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
        ByVal nSize As Long) As Long
        
Const DRIVE_CDROM = 5
Const DRIVE_FIXED = 3
Const DRIVE_RAMDISK = 6
Const DRIVE_REMOTE = 4
Const DRIVE_REMOVABLE = 2

Private Sub Closebmp_Click()
lblClosebmp.Visible = False 'hide
lblBmp.Visible = True ' show
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
Dim drivetype As Long
Dim freespace As Long, Sectors As Long
Dim Bytes As Long
Dim freeClusters As Long, totalClusters As Long
Dim retValue As Long
Dim buffer As String * 255
Dim DName As String

    Screen.MousePointer = vbHourglass
    DoEvents
    DName = Left(Drive1.Drive, 2) & "\"
    drivetype = GetDriveType(DName)
    Select Case drivetype
        Case 0
           Label5.Caption = "UNDETERMINED"
        Case DRIVE_REMOVABLE
           Label5.Caption = "REMOVABLE"
        Case DRIVE_FIXED
           Label5.Caption = "FIXED"
        Case DRIVE_REMOTE
           Label5.Caption = "REMOTE"
        Case DRIVE_CDROM
           Label5.Caption = "CDROM"
        Case DRIVE_RAMDISK
           Label5.Caption = "RAMDISK"
End Select
'Get free space
retValue = GetDiskFreeSpace(DName, Sectors, Bytes, _
           freeClusters, totalClusters)
           
Label6.Caption = Sectors * Bytes * freeClusters
Screen.MousePointer = vbDefault
DoEvents
Debug.Print App.Path

End Sub

Private Sub File1_Click()
Dim strFilePath As String
'Query the option buttons to see which one
'has been checked.
'Show the bitmap graphic
picDisplay.Picture = picBitmap.Picture
'OptList.Value = True
'Assign the exact path of the graphic in the file
'list box to the strFilePath string variable.
'Don't forget, to get the string in a list box
'you must identify the Listindex selected within
'a List Control's List array.
strFilePath = File1.Path & "\" _
& File1.List(File1.ListIndex)
'Load the picture from disk and assign it to the
'picture property of the Picture control.
picDisplay.Picture = LoadPicture(strFilePath)
End Sub

Private Sub Command1_Click()
    End
End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path

End Sub

Private Sub Form_Load()
Drive1_Change
File1.path = App.path
Subject: Re: in my project VB.60, I need the command how to unhide hidden folder on diskette
From: slk-ga on 30 Oct 2002 17:47 PST
 
SETATTR "A:\*.*", vbnormal

This will set ALL of the hidden files to normal.  If you want to only
set FOLDERS, use the DIR function in a loop to step through all of the
files.  Use the GETATTR function to determine which ones are
directories, and for those feed the name (wihtin the loop so you get
them all) to the SETATTR statement.

That should do it!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy