Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

How to Create a folder in Win 95?

I have problems with creating a folder in win 95 using VB.
But i did not encounter any problems in win 98 & win 2k.
i use system object to create the folder but it fails in win 95.
Can someone help me thanks ....
0
furballz
Asked:
furballz
1 Solution
 
Roshan DavisCommented:
'In general section
Private Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (ByVal lpPathName As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Private Type SECURITY_ATTRIBUTES
    nLength As Long
    lpSecurityDescriptor As Long
    bInheritHandle As Long
End Type

Private Sub Command1_Click()
    Dim Security As SECURITY_ATTRIBUTES
    'Create a directory
    Ret& = CreateDirectory("C:\Directory", Security)
    'If CreateDirectory returns 0, the function has failed
    If Ret& = 0 Then MsgBox "Error : Couldn't create directory !", vbCritical + vbOKOnly
End Sub
 

GOOD LUCK
0
 
Ryan ChongCommented:
Hi furballz,

I think this should works in win95:

mkdir "C:\myFolder"
0
 
furballzAuthor Commented:
hi ryancys

does this method work for other OS as well like win 98 , win 2k n NT?

thanks ..
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ryan ChongCommented:
Current i'm using Win2000 professional, try this at home before which OS is Win98. This method should integrated/ works for all OS under M$ products :)
0
 
rspahitzCommented:
I've successfully used mkdir since pre-VB (Quick BASIC) and on every Win OS except XP (haven't tried it yet.)  Never had a problem...although the File System Object should also work fine unless the dll is not installed on the O/S (whereas mkdir requires not additional dll file!)
0
 
DanRollinsCommented:
Hi furballz,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: roshmon and ryancys

furballz, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
kodiakbearCommented:
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now