March 31, 2008
Articles, Dani Vainstein, Files, QTips
0
Option Explicit Const ReadOnly = 1 Dim fso, file Dim filePathStr filePathStr = "C:\MyFile.txt" Set fso = CreateObject( "Scripting.FileSystemObject" ) If fsoutil.FileExists( filePathStr ) Then Set file = fso.GetFile( filePathStr ) If file.Attributes And ReadOnly Then file.Attributes = file.Attributes Xor ReadOnly End If Else Reporter.ReportEvent micWarning, "Change Attributes", "File -> " & filePathStr & "
Read More
March 31, 2008
Articles, Dani Vainstein, Files, QTips
0
Public Sub FileSizeStrings( ByVal fileSize, ByRef sizes ) Const K_SIZE = 1024 Set sizes = CreateObject( "Scripting.Dictionary" ) fileSize = CDbl( fileSize ) sizes.Add "Bytes", Cstr( fileSize ) tmpSize = CDbl( fileSize / K_SIZE ) sizes.Add "KB", Cstr( tmpSize ) tmpSize = CDbl( tmpSize / K_SIZE ) sizes.Add "MB", Cstr( tmpSize ) tmpSize = CDbl(
Read More
March 31, 2008
Articles, Dani Vainstein, QTips, Text Files
0
System.IO.File class provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of FileStream objects. The CreateText method creates or opens a file for writing UTF-8 encoded text. The following example demonstrates some of the main members of the File class. Dim pathStr Dim sysIoFile, sw pathStr
Read More
May 15, 2008
Articles, QTips, Yaron Assa, ZIP
0
Windows XP has a built-in ZIP mechanism integrated into its file-system. We can easily use this to create standard ZIP archives with only a few commands: 1: 'Variable Declaration 2: Dim sSourceFolder 3: Dim sArchiveFile 4: 5: Dim oShell 6: Dim oZIP 7: Dim oSourceFolder 8: 9: 'Variable Initalization 10: sSourceFolder = "C:\SomeFolder" 11: sArchiveFile
Read More
March 31, 2008
Articles, Dani Vainstein, Files, QTips
0
Del is a command used to delete files from the computer. DEL or ERASE is a command used to delete files from the computer. Windows 2000 and Windows XP syntax Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names
Read More
March 31, 2008
Articles, Dani Vainstein, Files, Folders, QTips
0
Del is a command used to delete files from the computer. DEL or ERASE is a command used to delete files from the computer. Windows 2000 and Windows XP syntax Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names
Read More
March 31, 2008
Articles, Dani Vainstein, Files, QTips
0
Option Explicit Public Function DeleteOldFiles( ByVal folderPath, ByVal daysOld ) Dim fso, folder, files, file Dim dateCreatedStr, daysDiff DeleteOldFiles = -1 Set fso = CreateObject( "Scripting.FileSystemObject" ) If Not fso.FolderExists( folderPath ) Then Reporter.ReportEvent micWarning, "DeleteOldFiles", "Folder -> " & folderPath & " was not found." Exit Function End If Set folder = fso.GetFolder( folderPath
Read More
March 31, 2008
Articles, Dani Vainstein, Files, Folders, QTips
0
Del is a command used to delete files from the computer. DEL or ERASE is a command used to delete files from the computer. Windows 2000 and Windows XP syntax Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names
Read More
March 31, 2008
Articles, Dani Vainstein, DotNetFactory, Files, QTips
0
Del is a command used to delete files from the computer. DEL or ERASE is a command used to delete files from the computer. Windows 2000 and Windows XP syntax Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names
Read More
March 31, 2008
Articles, Dani Vainstein, Files, Folders, QTips
0
Del is a command used to delete files from the computer. DEL or ERASE is a command used to delete files from the computer. Windows 2000 and Windows XP syntax Deletes one or more files. DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names names Specifies a list
Read More