Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check if folder exists... 1

Status
Not open for further replies.

unborn

Programmer
Joined
Jun 26, 2002
Messages
362
Location
US
and also.. how would i make it so .. well what im doing is... maken a program.. it will check if the folder exists.. then everyhting inside of it (includinging other folders) will be moved to another folder.. im not exactly sure how i would do this... any help would be appretiated.. imma start trying to crack some code now... well.. continue to .. blah.. thanks for any help! in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
Ok, go to Project and click on Prefrences and then check Microsoft Scripting RunTime, and then you can write this:
For Example:
Private Sub cmdOK_Click()
dim fso as New FileSystemObject
dim tstream as TextStream
spath = App.Path & "\NewFolder"
'this check if the folder exist
If fso.FolderExist(spath) then
'Moves the Folder
fso.MoveFolder(Source As String, Destination As String)
Else
Exit sub
End sub

Hope this helps


 
OOPS..
Sorry, i wrote dim tstream as textstream by mistake, you don't even need to have that...
 
thanks a million hehe your code is a little off... but from it i got the things i needed for sure.. and for future readers.. it is in Refrence not prefrence haha.. i went for a mighty look to find it and though i might check that out haha and bam it worked heheh :) thanks alot survivor :)

can anyone help me with the well i could call it "include subfolder" function... im not askign for whole code.. just perhaps some steps to how i would do it.. im still clueless.. btw i wasnt denying the code.. if you wanna share it be my guest.. thanks for all help!! in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top