Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 how to get specific files

Author  Topic 

dasu
Posting Yak Master

104 Posts

Posted - 2004-09-19 : 03:17:49
Hello every body ,

please suggest me a solution for this case.
like i want to delete all the files which are there in c:\dasdirectory before that i have to test whether this file exists there
or not.if file is there then i will delete that.
so please suggest me proper solution in vb script.
regards
dasu.g

dasu
Posting Yak Master

104 Posts

Posted - 2004-09-19 : 04:27:57
generally in mssqlserver we will find a specific pattern like this
%123%
but how to get same affect in vbscript please tell me thissolution
regards
dasu.g
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-09-19 : 19:07:36
[code]dim fso
set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists(yourFileName) then
' insert your code here
end if
[/code]
Have a look at the VBScript documentation under the FileSystemObject for more info
Go to Top of Page
   

- Advertisement -