2 Replies - 15980 Views - Last Post: 12 August 2008 - 05:24 AM Rate Topic: -----

#1 Guest_NIXZ*


Reputation:

Folder Exists Method

Posted 12 August 2008 - 05:09 AM

Works:
IF My.Computer.FileSystem.FileExists("CTRL\Registry\Victim.dat")=False Then  
' File not found  
else  
' File Found  
EndIf  



That Works with the File exist method how can i use the same for Folders?

Doesn't Work:
IF My.Computer.FileSystem.FolderExists("CTRL\Registry\")=False Then  
' File not found  
else  
' File Found  
EndIf  


This post has been edited by born2c0de: 12 August 2008 - 05:25 AM


Is This A Good Question/Topic? 0

Replies To: Folder Exists Method

#2 chooky  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-July 08

Re: Folder Exists Method

Posted 12 August 2008 - 05:22 AM

I use
Imports System.IO 

Directory.Exists(strPath)



Was This Post Helpful? 0
  • +
  • -

#3 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: Folder Exists Method

Posted 12 August 2008 - 05:24 AM

Use this instead:
If System.IO.Directory.Exists("directory path") Then
   ' Directory Exists
Else
   ' Directory does not exist.
End If


EDIT:
@chooky: damn you're fast ;)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1