Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove Folder Problem
Message
From
05/05/2005 05:28:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/05/2005 05:11:39
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01011193
Message ID:
01011197
Views:
17
>Dear Sir,
>
>I want to remove a folder and use following code but it generates error.
>The line on which error appears is the second last line.
>
>Please modify codes or suggest some other codes to delete any folder.
>
>
>cFolder1 = alltrim(Thisform.text4.value)
>cFolder2 = alltrim(thisform.text8.value)
>
>&& test if folder already exists
>fso =createobject("Scripting.FileSystemObject")
>aoo= fso.FolderExists(cFolder2)
>
>&& if folder already exists then delete
>if aoo=.t.
>fso =createobject("Scripting.FileSystemObject")
>fldr=fso.DeleteFolder(cFolder2) && GENERATES ERROR ON THIS LINE
>endif
>
cFolder1 = alltrim(Thisform.text4.value)
cFolder2 = alltrim(thisform.text8.value)

cFolder2 = iif(right(m.cFolder2,1) = "\",justpath(m.cFolder2),m.cFolder2)
fso =createobject("Scripting.FileSystemObject")

&& test if folder already exists
&& if folder already exists then delete
if fso.FolderExists(m.cFolder2)
 fso.DeleteFolder(m.cFolder2,.t.)
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform