Beruflich Dokumente
Kultur Dokumente
'********************************************************************************
Set fso=CreateObject("scripting.filesystemobject")
Set fl=fso.OpenTextFile(FilePath,1)
MsgBox fl.ReadAll
'********************************************************************************
'********************************************************************************
Set fso=CreateObject("scripting.filesystemobject")
Set fl=fso.OpenTextFile(FilePath,2)
'Write characters
fl.Write("hello")
fl.WriteBlankLines(2)
'********************************************************************************
'Write a program to print all lines that contains a word either “testing” or “qtp”
'********************************************************************************
Set fso=CreateObject("scripting.filesystemobject")
Set fl=fso.OpenTextFile(FilePath,1)
print fl.ReadLine
End if
Wend
'********************************************************************************
'********************************************************************************
Set fso=CreateObject("scripting.filesystemobject")
msgbox fso.GetAbsolutePathName("")
'********************************************************************************
'********************************************************************************
Dim fso,fld,sFiles,sFile
print sFile.name
Next
'********************************************************************************
'********************************************************************************
Dim fso,fld,sfolders,sFld
msgbox sFld.name
Next
'********************************************************************************
'********************************************************************************
print drv.DriveLetter
Next
'********************************************************************************
'********************************************************************************
msgbox fso.GetDriveName(fso.GetAbsolutePathName(""))
'********************************************************************************
'********************************************************************************
Set fl = fso.GetFile(FilePath)
print fl.DateLastModified
print fl.DateCreated
'********************************************************************************
'********************************************************************************
Set fl = fso.GetFile(FilePath)
msgbox fl.Size
'********************************************************************************
'********************************************************************************
Function DisplaySpecificFileTypes(FolderPath,FileType)
If lcase(sFl.type)=lcase(FileType) then
print sFl.name
End if
Next
End Function
'********************************************************************************
'********************************************************************************
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(drvPath)
'********************************************************************************
'********************************************************************************
fldPath="C:\WINDOWS"
Const WindowsFolder =0
Const SystemFolder = 1
Const TemporaryFolder = 2
If lcase(fso.GetSpecialFolder(WindowsFolder))=lcase(fldPath) or
lcase(fso.GetSpecialFolder(SystemFolder))=lcase(fldPath) or
lcase(fso.GetSpecialFolder(TemporaryFolder))=lcase(fldPath) then
Else
End if
'********************************************************************************
'********************************************************************************
FolderPath="C:\Documents and Settings\sudhakar kakunuri\Desktop\"
If sFile.size=0 Then
print sFile.name
End If
Next
'********************************************************************************
'********************************************************************************
Function CopyContentstoOtherFolder(SourceFolder,TargetFolder)
sFile.copy TargetFolder&"\"&sFile.name
Next
Set sFlds = fld.SubFolders
sFld.copy TargetFolder&"\"&sFld.name
Next
End Function
'********************************************************************************
'********************************************************************************
If fso.FileExists(fPath) then
End if