Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: sami bissani
  Where is sami bissani?
 Doha
 Qatar
 sami bissani
 Tags
Subject: RE: Create folder
Thread ID: 233847 Message ID: 233848 # Views: 47 # Ratings: 2
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, July 07, 2009 1:12:46 PM         
   


> Gentlemen,
>
> i'm using a command that is supposed to check if a folder exists, if not, it should create it.
> the problem is that my command is always trying to create that folder, so i'm getting an error saying : this folder already exists.
>
> can someone show me please what is wrong with my command ?
>
> vpath='c:\mynewfolder'
>
> IF NOT DIRECTORY("vpath")
> MD ("&vpath")
> ELSE
> ?'ALREADY EXISTS'
> ENDIF

vpath = "c:\mynewfolder"
IF NOT DIRECTORY(m.vpath)
   MD (vpath)
ELSE
   ? "ALREADY EXISTS"
ENDIF



-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.



COMPLETE THREAD
Create folder Posted by sami bissani @ 7/7/2009 1:11:23 PM
RE: Create folder Posted by Borislav Borissov @ 7/7/2009 1:12:46 PM