Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

(Page 1 of 2) 41 Result(s) found 

 

Create a Touch utility
Total Hit (3185) The SetCreationTime, SetLastWriteTime, and SetLastAccessTime methods of the System.IO.Directory class let you modify the date attributes of a file or directory: «Code LangId=2» ' Change the access date- and time of all files in C:\DOCS. For Each fname In Directory.GetFiles("c:\docs") File. ....Read More
Rating
Create all the subdirectories for a new folder
Total Hit (3765) The System.IO.Directory class exposes a CreateDirectory method that, as its name suggests, can create a subdirectory. However, this method is even more powerful than it appears at a first glance, in that it can even create all the intermediate subdirectories, if necessary. In other words, the follow ....Read More
Rating
Create directory paths
Total Hit (3763) Visual Basic 6's MkDir command, as well as the DOS MD command, can create only one subdirectory and fail if any subdirectory on the specified path doesn't exist: «Code LangId=2» ' This VB6 statement fails if C:\MyApp doesn't exist MKDIR "c:\MyApp\MyDir" «/Code» Conversely, the Directory.Crea ....Read More
Rating
Display a directory tree
Total Hit (3951) Thanks to the GetDirectories and GetFiles methods of the System.IO.Directory class, you need very little code to iterate over all the directories and files of a directory tree. For example, the following code snippet prints the structure of a directory tree and (optionally) the name of files in each ....Read More
Rating
Filter file names on their names or attributes
Total Hit (2772) The GetFiles and GetDirectories methods of the System.IO.Directory class can take an argument containing wildcards, to filter the result: «Code LangId=2» ' Display all the *.txt files in C:\DOCS. Dim fname As String For Each fname In Directory.GetFiles("c:\docs", "*.txt") Console.WriteLin ....Read More
Rating
Reading text files
Total Hit (3879) In Visual Basic .NET you read a text file by first opening a StreamReader on it, and then iterating over all its lines until its Peek method returns -1: «Code LangId=2» Dim sr As New StreamReader("c:\autoexec.bat") ' Display all the text lines in the file. Do Until sr.Peek = -1 ' The Re ....Read More
Rating
Retrieve file version information
Total Hit (3625) The System.Diagnostics.FileVersionInfo class lets you easily read file version information without having to call Windows API functions (as you have to do under previous VB versions). This class has a static GetVersionInfo method that returns a FileVersionInfo object related to a given file. Once yo ....Read More
Rating
AddBackslash - Append a backslash to a path if needed
Total Hit (4088) «Code LangId=2» ' Append a backslash (or any character) at the end of a path ' if it isn't there already Function AddBackslash(ByVal Path As String, Optional ByVal ch As Char = "\"c) _ As String If Not Path.EndsWith(ch) Then AddBackslash = Path & ch Else AddBack ....Read More
Rating
ChangeFileExtension - Modify the extension in a file name
Total Hit (2920) «Code LangId=2» ' Change the extension of a file name ' if the last argument is True, it adds the extension even if the file doesn't ' have one Function ChangeFileExtension(ByVal FileName As String, _ ByVal Extension As String, Optional ByVal AddIfMissing As Boolean = False) _ As St ....Read More
Rating
CompareFiles - Comparing two binary/text files
Total Hit (2733) «Code LangId=2»' Returns a boolean indicating whether two files are equal ' Example: Debug.WriteLine(CompareFiles("D:\File1.mdb", "D:\File2.mdb")) Function CompareFiles(ByVal path1 As String, ByVal path2 As String) As Boolean Dim file1 As New System.IO.FileInfo(path1) Dim file2 As New ....Read More
Rating
ConcatenateFiles - Concatenating multiple text files
Total Hit (2826) «Code LangId=2» ' Concatenate a variable number of text files into a single result file ' ' Params: ' - resultFile: the complete path of the result file you want to create ' - header: a string that is written when a file is added to the result file. ' Note: this string can contain the #Fi ....Read More
Rating
CopyDirectory - Copy a directory
Total Hit (3035) «Code LangId=2» ' Copies a source directory to the destination directory. ' The last parameter specifies whether the files already present in the ' destination directory will be overwritten ' - Note: requires Imports System.IO ' - Usage: CopyDirectory("C:\Misc", "D:\MiscBackup") Sub CopyDire ....Read More
Rating
FolderHasFiles - Returns whether the specified folder has files
Total Hit (2678) «Code LangId=2» ' Returns a boolean indicating whether the specified folder has files Function FolderHasFiles(ByVal folderPath As String) As Boolean Return System.IO.Directory.GetFiles(folderPath).Length > 0 End Function «/Code»
Rating
FolderHasSubFolders - Returns whether the specified folder has sub-folders
Total Hit (2687) «Code LangId=2» ' Returns a boolean indicating whether the specified folder has sub-folders Function FolderHasSubFolders(ByVal folderPath As String) As Boolean Return System.IO.Directory.GetDirectories(folderPath).Length > 0 End Function «/Code» ....Read More
Rating
GetDirectorySize - Calculate the size of a directory
Total Hit (2776) «Code LangId=2» ' Returns the size of the specified directory ' - Note: requires Imports System.IO ' - Usage: Dim DirSize As Long = GetDirectorySize("D:\Projects") Function GetDirectorySize(ByVal DirPath As String) As Long Dim DirSize As Long Dim Dir As DirectoryInfo = New DirectoryInfo( ....Read More
Rating
GetResourceContent - Retrieving the content of an embedded text file
Total Hit (2637) «Code LangId=2» ' Retrieve the content of an embedded text file ' Note: the file must be included in the project as an embedded resource. ' - after adding the file to the project set its Build Action property to ' Embedded Resource ' ' Example: txtScript.Text = GetResourceContent("script.sql ....Read More
Rating
IsDriveReady - Returns whether a drive is ready
Total Hit (3121) «Code LangId=2» ' Returns a boolean indicating whether a given drive is ready ' Example: check if the floppy disk drive is ready ' Debug.WriteLine(IsDriveReady("a")) Function IsDriveReady(ByVal driveLetter As String) As Boolean If driveLetter.Length = 1 Then driveLetter &= ":\" Dim ....Read More
Rating
IsExecutableFile - Returns whether the file is an executable
Total Hit (2668) «Code LangId=2» ' Returns a boolean indicating whether the file is an executable Function IsExecutableFile(ByVal filePath As String) As Boolean ' add more extensions if you wish Dim extensions() As String = New String() {".exe", ".bat", ".com", ".pif"} ' return true if the extension ....Read More
Rating
IsImageFile - Returns whether the file is an image
Total Hit (3667) «Code LangId=2» ' Returns a boolean indicating whether the file is an image Function IsImageFile(ByVal filePath As String) As Boolean ' add more extensions if you wish Dim extensions() As String = New String() {".bmp", ".jpg", ".jpeg", ".gif", _ ".tif", ".tiff", ".png", ".tga", ....Read More
Rating
IsValidPath - Validating a system path
Total Hit (4586) «Code LangId=2»' Validate a system path ' Example: ' MessageBox.Show(IsValidPath("C:\Test\Memo.txt")) ' => True ' MessageBox.Show(IsValidPath("\\RemotePC\Test\Memo.txt")) ' => True ' MessageBox.Show(IsValidPath("C:\Test\Mem|o.txt")) ' => False Function IsValidPath(ByVal p ....Read More
Rating
LoadTextFile - Load the contents of a text file
Total Hit (2798) «Code LangId=2» ' Returns the content of the specified text file ' Note: it can throw an exception ' Usage: Dim FileContent As String = LoadTextFile("C:\Autoexec.bat") Function LoadTextFile(ByVal FilePath As String) As String Dim sr As System.IO.StreamReader Try sr = New ....Read More
Rating
SaveTextFile - Save or append text to a file
Total Hit (3654) «Code LangId=2» ' Saves a text file. If the destination file already exists, ' its content can be replaced, or the new content can be appended ' at the end of the file, according to the last parameter ' Note: the destination directory must exist, otherwise the file is not ' saved and th ....Read More
Rating
SearchFileInDirTree - Searches a file on a directory tree
Total Hit (2854) «Code LangId=2» <System.Runtime.InteropServices.DllImport("imagehlp.dll")> Shared Function _ SearchTreeForFile(ByVal rootPath As String, ByVal inputPathName As String, _ ByVal outputPathBuffer As System.Text.StringBuilder) As Boolean End Function ' Returns the complete path+name of th ....Read More
Rating
SearchFileOnPath - Searching a file on the system
Total Hit (2695) «Code LangId=2»<System.Runtime.InteropServices.DllImport("kernel32")> Shared Function _ SearchPath(ByVal tartPath As String, ByVal fileName As String, _ ByVal extension As String, ByVal bufferLength As Integer, _ ByVal buffer As System.Text.StringBuilder, ByVal filePart As String) As ....Read More
Rating
GetOsqlPath - Get the path of the SQL Server's OSQL.exe utility
Total Hit (2749)
Rating
This is a link to a different site How do I determine if a file or directory exists?
Total Hit (2072)
Rating
This is a link to a different site How do I rename a file or directory?
Total Hit (1985)
Rating
This is a link to a different site FAQ: How do I copy or move a file from one location to another?
Total Hit (1973)
Rating
This is a link to a different site FAQ: How do I delete a file from the Web server's file system?
Total Hit (1823)
Rating
This is a link to a different site How Do I...Read a text file?
Total Hit (1040) This sample retrieves information from a text file, and uses an ArrayList to display that information for the user. Opening and reading files for read access is an important part of IO functionality, even if you do not need to write to the file in question. In this example, we open a file for read ....Read More
Rating


(Page 1 of 2) 41 Result(s) found  1 2

Recommanded Links

 

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.