i change to "c:\" only search root file
i want search all file in volume by my set
all file in root,subfolder.....
thanks
"JakeDAHS" <jskiba99@gmail.com>
???????:1150168428.243545.115520@c74g2000cwc.googlegroups.com...
>
>
>
> Joey Chen wrote:
>> how to set search all files in drive C ?
>>
>> thanks alot
>>
>> "JakeDAHS" <jskiba99@gmail.com>
>> ???????:1149999550.912097.24370@m38g2000cwc.googlegroups.com...
>> >
>> > Joey Chen wrote:
>> >> office has some Mac Computer
>> >>
>> >> when use file share will Mac will make the ._XXXXX Files
>> >>
>> >> How to make a script when i run this script will find all ._xxxxx file
>> >>
>> >> and delete
>> >>
>> >> then log to a file what file been delete
>> >>
>> >> thanks alot
>> >
>> > Dim oFSO, oFolder, oLog
>> > Dim sFolder, sLog
>> >
>> > sFolder = "C:\temp1"
>> > sLog = "c:\temp1\log.txt"
>> >
>> > Set oFSO = CreateObject("Scripting.FileSystemObject")
>> > Set oFolder = oFSO.GetFolder(sFolder)
>> > Set oLog = oFSO.OpenTextFile(sLog,8,1)
>> >
>> > For Each oFile in oFolder.Files
>> > If Left(oFile.Name, 2) = "._" Then
>> > sLogLine = Now & "," & oFile.Path
>> > x = oFSO.DeleteFile(oFile.Path)
>> > If x = 0 Then
>> > oLog.writeline sLogLine & ", Success"
>> > Else
>> > oLog.writeline sLogLine & ", Failure"
>> > End If
>> > End If
>> > Next
>> >
>
>
> Change sFolder = "C:\temp1" to directorty to run against.
>
> -Jake
>