Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Create a folder in Win 95?

Posted on 2002-03-19
7
Medium Priority
?
207 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 200 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 53

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 53

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

Industry Leaders: 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!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

721 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