Results for "Category: Files/ File Controls/ Input/ Output"
Read large text files faster. Reads lines in text files about 30% faster then the TextStream class. Skips much faster.
This code passes all form variables by creating hidden copies of every form variable that was passed to it. This is great for gathering information over multiples forms (i.e. Order Processing).
This code demonstrates the basics behind blocked IO. This is commonly used when copying files.
This VB Class allows you to quickly and easily read/write files, line by line, word by word.
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!
My coding actually does several things. The main thing is that it can search an entire Drive and all of its Directories for a file you specify and at the end of the search display the results of it. Or you can do the same thing but this time look for any file with an extention you specify. I made this search for the file using API but I left a function in there you can edit to search for the files without API but it's a little slower and not recommended. This Screen Shot can pretty much explain it all... E-mail: mikecanejo@hotmail.com AIM: Mike3dd
This program will show you how to create a file with a specified size with accuracy. There's not that many uses for this program but it's accurate and comes complete with a progress bar and a size calculator. This is heavily commented, so please post some feedback or even better, vote for it ;]
BUG: It put a extra byte at the end of the merge due to a mis-calculation, fixed it!! This is Version 2 from my last file merging submission which shelled 'copy' file commands to DOS which merged the files. Well as pathetic as that seemed, i was a lazy programmer and today i rewrote it from scratch to merge the files to one in binary in vb. This application will let you merge any type of file(s), one or more, into one big file. This will work with Almost all audio files (.mp3, .wav) and almost all Video files (.Avi, .Mpeg). Just think, merging all your favorite mp3s into one big file so you don't have to keep making playlists on your audio player and just think if you have a split up DiVX movie and want to put all of the parts together, this will do it. It especially works good on Motion Picture Experts Group (MPEG) formats flawlessly. The only errors I have noticed with merging mp3s together was if one of the mp3s is a bitrate under 100 and another is above 100 the one below becomes distorded. As for mpegs it seems to work perfect on all types. This will also merge .VOB files ripped from your DVD! Please vote for this if you like this or find it useful. -Mike Canejo
(******Another Big Update, v3 now... I added a 'All Files' (*.*) scan to it so you can see Every File found in an EXE!!! It also sorta the listbox alphabetically! Check It Out!)(*****Updated!!! v2, Calling it v2 cause of the major changes i made to the project including a working filtering scheme that correctly fixes the found filenames correctly as far as i can tell... tell me what u think of this new version!)(****Updated!, Now has a Search Query box feature so you can search for more than one file extention at once! I also included 2 filtering loops to remove bogus findings, but since it is untested fully i left the original project in the zip for you to have regardless... Check it out.)(***Updated, removes dupes now cause some programs have a reoccuring file being found in the search, so i gave the option to remove dupes or not, check screenshot!)(**Updated, I just fixed the VB5 InstrRev part, sorry if it didn't work..)(*Updated, Just added a save feature to it for developers who want to include it in a readme or something, good luck) Description: I needed a file dependency sniffing program really quick for a friend who sent me a Borland exe and needed to know which dlls it needed so I ran to PSC to find my self searching for keywords and not get anything, then I tried one word and kept browsing through the many entries of PSC. Then I came accross one, called nFile_Search, it was so pathetic I could have cried, the only thing i liked was the interface so I kept it for this program, heh, but I cleared the whole form of code and wrote this up and made it so you can search for other types of files besides .dlls, to expand its usability (.ocx, .exe, @ for emails, anything) so enjoy and if anyone out there has tips or ideas to make it more effecient then please submit. Also please vote if it isnt too much trouble ;p IM me at: Mike3dd Email: MikeCanejo@hotmail.com for anything. ;]
This will take a list of waves (RIFF format most popular by microsoft) and properly merge them with a new header on the output file. I have submitted file mergers in the past and people complained on how it didn't work with wave file types since they have headers that tell it how to be played so this is the reason i wrote this project. If someone out there can merge a couple with different sampling rates or bitspersample and send some feedback on what the end result is then that would be appriciated, i havn't had time to test this out fully, it just works as far as i can tell with the wave riff format. Email me at mikecanejo@hotmail.com for any questions that you have since i didn't comment much on this since its a simple method i thought. Good luck tell me what you think and please don't forget to vote if you like it.
In rare situations, there are times where you may need to know how many line-breaks a file contains "before hand". The situation for me was that I wanted to let the user of my program know what percentage of a file was being read (had to be line by line) and inorder to do this, I had to know how many lines a file contained. Now, this is meant for HUGE lists of files. Examples are, email lists, number lists, contact lists, etc. This code will read 1,000,000 lines of a file per second (my machine is 2.6 Ghz, p4, 512MB ram). This is VERY fast. I included a benchmarking class so you can see it for yourself. I also included a zipped file which contains one million lines (16MB unzipped, 40KB zipped) and a file containing one hundred thousand lines of text as well. NOTE: This isn't just for counting lines in a file, it can be used to count how many occurances a string comes up, such as a First Name, a Last Name, a phone number, a word, etc. The whole point of this program is to buffer a file into memory as fast as the hard drive can go (1MB buffer by default) and then read off that buffered data as it comes in. The OLD/Popular method for counting lines: Dim lLineCount as long, strLine as string * 1 Open "C:\file.txt" for input as #1 Do While not eof(1) Line Input #1, strLine lLineCount = lLineCount + 1 Loop MsgBox lLineCount & " Lines Read."
After looking all over on PSC i was unable to find Short, Simple and Clean code to get the target path of a window's shortcut (.lnk) file, so here is an easier way.
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').
When I started with Serial Comms and the API's I tried to find a piece of code as an example... I couldn't , so I wrote my own .. and here it is. Any suggestions to better the code will be great. This little program will open a COM port and read from it as well as write to it. Try this on any serial comm's device like a Modem, barcode scanner, Comm Printer etc.
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.
Opens a text file much fast than a "Do While Not EOF(filenumber)" loop. Makes file load times almost non-existant.
Function that loads delimeted, fixed or Excel-files into an array.
Make your application run from command lines or the run dialog with arguements. ie: myapp.exe -m No need to vote for this code because it is really basic.
generates a 'dummy' file which can be any type and any number of kilobytes. 110% commented just like my code 'A+ Secure Delete'. purpose is to generate files, so not much of a purpose. i just saw it in a couple of hacking/security programs and thought i'd try it.