Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > Document Management

Document Management - Page 3

41-60 of 91     Previous     Next
ConcatenateFiles - Merge multiple text files in one
by Marco Bellinaso
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 - Separator: a string that is written when a file is added to the result file. Note: this string can contain the #FilePath# tag that will be ...
Retrieve information on all available drives
by Francesco Balena
You can retrieve information about all the available drives using calls to Windows API, if you like the hard way of doing things. A much simpler solution is offered by the Microsoft Scripting Runtime library, that exposes a Drive object that lets you get all those info by querying a property:
Copy a directory tree
by Francesco Balena
Creating a VB routine that copies a whole directory tree can be a time-consuming job, but fortunately you don't have to do it. In fact, you can quickly create an entire folder, including all its subfolders, using the CopyFolder method of the FileSystemObject object, that is exposed by ...
Get the canonical name of a file
by Francesco Balena
In many cases you may need the canonical (or absolute) name of a file, for example when you need to compare two relative file names (relative to the current directory or drive, that is) and decide whether they point to the same or different files. You can obtain the canonical path of a ...
Delete a folder and all its subfolders
by Francesco Balena
The RmDir command can delete a directory only if it doesn't contain files or sub-directories. If the directory you want to delete does contain other files or, worse, subdirectories it seems that you are forced to use a recursive routine that does the job. A simpler solution is offered by ...
CompareDirectories - Find different files in two directories
by Francesco Balena
Compare files in two directories returns a two-dimensional array of variants, where arr(0, n) is the name of the N-th file and arr(1, n) is one of the CompareDirectoryEnum values NOTE: requires a reference to the Microsoft Scripting Runtime type library Usage example: compare the ...
FolderHasSubfolders - Determine whether a directory has one or more subdirectories
by Marco Bellinaso
Returns True if the specified folder has at least one sub-folder
GetFileOwner - Get the owner of an NTFS file
by Francesco Balena
return the name of the file owner runs over Windows NT or 2000, and works only with files in NTFS partitions
SynchronizeDirectories - Synchronize the contents of two directories
by Francesco Balena
Synchronize two directories This routine compares source and dest directories and copies files from source that are newer than (or are missing in) the destination directory if TWOWAYSYNC is True, files are synchronized in both ways NOTE: requires the CompareDirectories routine and a ...
SynchronizeDirectoryTrees - Synchronize files in two directory trees
by Francesco Balena
Synchronize two directory subtrees This routine compares source and dest directory trees and copies files from source that are newer than (or are missing in) the destination directory if TWOWAYSYNC is True, files are synchronized in both ways NOTE: requires the CompareDirectories and ...
ReadFromStdInput - Read from standard input stream
by Francesco Balena
read a number of chars from standard input channel if NumBytes < 0 then it reads all the bytes from the standard input NOTE: this routine works only in compiled applications
WriteToStdOutput - Write to standard output stream
by Francesco Balena
write to standard output channel NOTE: this routine works only in compiled applications
FilesToArray - Read all the files or subdirectories in a directory using API functions
by Francesco Balena
Returns a one-based string array containing the files (or directories) located in the specified path the Path argument can contain wildcards, e.g. "C:\*.doc")
IsExecFile - Check whether a file is an executable file
by Marco Bellinaso
check whether the specified file is an executable, by checking the last 4 characters. Example: MsgBox "File is exe: " & IsExecFile("C:\windows\notepad.exe")
MakeDirPath - Create a path, including intermediate directories
by Francesco Balena
Create a nested directory This is similar to the MkDir command, but it creates any intermediate directory if necessary
SearchFileOnPath - Search a file on system path
by Francesco Balena
Search a file on the system returns the complete file path+name, or "" if file not found If SearchDirs is omitted, then the file is searched in the following directories, in this order 1. the directory from where the app loaded 2. the current directory 3. the \Windows\System32 directory ...
GetFileDescriptionFromReg - Get a file's description from the registry
by Marco Bellinaso
get the description of a file from the registry or a null string if the file's extension isn't registered NOTE: requires the GetRegistrtValue function
GetFileDescription - Get a file's description through Windows API
by Marco Bellinaso
Returns the description of the specified file/folder (for example "Folder", "Executable file", "Bmp Image" and so on)
GetFileIcon - Retrieve the icon associated to a file
by Marco Bellinaso
Returns the description of the specified file/folder (for example "Folder", "Executable file", "Bmp Image" and so on) Get the file/folder's associated icon NOTE: uses the IconToPicture function (you can find it elsewhere in the Code Bank)
GetFilesInfo - Read all the information about all the files or subdires in a given path
by Francesco Balena
Returns a bi-dimensional variant array containing the files (or directories) located in the specified path the format of the returned array is as follows arr(0, n) = the name of the N-th file (String) arr(1, n) = file length (Double) arr(2, n) = creation time (Date) arr(3, n) = last ...
41-60 of 91     Previous     Next
Sitemap