Solved

How to Create a folder in Win 95?

Posted on 2002-03-19
7
198 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
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 49

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 49

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now