Results for "Category: Files/ File Controls/ Input/ Output"
Uses the FindFile, FindNextFile, and SearchPath API functions to quickly find a file on your hard drive. Runs faster than methods which use Dir$.
These two functions are designed to read and write a file as fast as possible in VB. It is faster for some cases than WinApi Read/WriteFile functions because you don't have to convert binary to string in a loop. Thats why, it is very fast and useful for any purpose. I have created it for my Encryption programme and with Windows Crypto functions and this two functions, my encrytion programme works faster than most of the Encrytion software you can download on the net. Hope it will be useful for you. Thanks. Ozan Yasin Dogan www.uni-group.org (will be online in 01/06/02)
Embed binary files within your programs to be written out to the file system once the program runs. This demonstration creates a Word document.
The program can remove extentions from multipile files, or add them to the files. Prefect if you need to renmae *.--- files or to add --- extention. The code is simple and readable, easy to modify for your own use...
There are many methods you can use to return certain parts of a fully qualified path to a file. Here is the SHORTEST and FASTEST way to 1) return just the path, 2) return just the filename, and 3) change the extension of a filename. The code is so short that it is probably faster to keep it inline than to create additional functions. (I've done so here to better illustrate the parameters.
I haven't seen this on PSC using the filesystem object or a collection. very neat and fast since you don't need to go through it twice to redim an array. the only slow down with this code is the print statement.
Search for a directories, sub-directories and files and sub-files without having objects on your form! You can even search in more directories! or use file-filters (*.bat;*.com;*.exe;ect...) and file-attributes (read only, hidden, ect...) while you search! This all in just one simply command! This version is much easer to use than the preview demo version 1.0. The results in this version also doesn't import duplicated results and some bugs are fixed. The results gives now also the size, date & time, and attributes. In the next version I will add some more commands, like a compleet directory/file browser. It sounds unbelievable but it's true. It's very easy and fast to use and it's over 100% user friendly! No heavy codes anymore just use this for all your codes! Download the file and see it yourself, I know you'll love this code!!!... I will release more codes when you vote for me, happy coding...
Normal users use the Shell command, but that command can't execute all kind of files, but this can
commonly needed file macros you hate to code over and over. Functions: GetFolderFiles, GetSubfolders, FileExists, FolderExists, SafeFileName, Read/Write/AppendFile, GetFreeFilename, FileNameFromPath,ChangeExtension, etc.. anyway this will help you clean up your code alot and make it more readable Dont forget to check my sight for more stuff: http://geocities.com/dzzie
Calculate Pi. This will only let you go to 32763 decimal places. ************************************************* If anyone nows any API for larger math please leave comment about it. *************************************************
Retrieve the version of a file (EXE/DLL etc). This code should be paste into a module and just called via CheckFileVersion('Path to the Exe or DLL').
This DOES use the kill function, but when you use this it actually opens the file you want to destroy, cleans it out, then deletes it so you don't get any error because of sensitive data!
Opens a text file much fast than a "Do While Not EOF(filenumber)" loop. Makes file load times almost non-existant.
These two functions will return the location of the Windows directory (WinDir) and the location of the System directory (SysDir).
Sets a file's attributes. With this you can create archive, hidden, normal, read-only, and system files.
This code demonstrate a simple procedure for reading and writing to and from a text file. Level: Beginners
This tip is the most powerful bit of code I've ever come across. It will act as an exe but with no need to compile. However you must have either Win 98 or IE5 for it to work
This will create and write into a *.txt file of your choice. Put this code in a timer and you have yourself a keystroke logger. You can save the contents of a textbox into a file also.
This will check if a dam*n file exists the easy and "right" way! Plz vote for this code if you like it!
Let the user select a directory (as workingdirectory, or for save/load data to/from, etc.), which is also known as a "Browse for Folder" function. This is the most easy way to provide this feature, just using the standard Common Dialog control.