Solved

How to Create a folder in Win 95?

Posted on 2002-03-19
7
204 Views
Last Modified: 2010-05-02
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
Comment
Question by:furballz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 50 total points
ID: 6881773
'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
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6881827
Hi furballz,

I think this should works in win95:

mkdir "C:\myFolder"
0
 

Author Comment

by:furballz
ID: 6881847
hi ryancys

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

thanks ..
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 52

Expert Comment

by:Ryan Chong
ID: 6881857
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
 
LVL 22

Expert Comment

by:rspahitz
ID: 6894907
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 7634177
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
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7666041
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question