Results for "Category: Files/ File Controls/ Input/ Output"
Deflate and inflate modules. I saw the article from Jim Reforma about how a deflate algorithm should work and noticed that people asked for working Deflate code. well here it is. This code can be used to create filetypes wich used Deflate as compression algo (ZIP,GZIP,CAB, etc.etc). The only thing you have to do is create the headerdata for these formats.(don't get me wrong but this can be a lot of work(bin there, Done that)). Don't expect to much of the code in terms of speed since it's all coded in VB, it is pretty fast but not by a long shot as fast as winzip. If you plan to code a ZIP compliant compressor, then take a look at my Archive Explorer And you will have ALMOST everything you need to know.
Hi All .. That's My First Upload To Planet . This Code Will Get All Files Located In Directory Including SubFolders .. It's Very Easy , Fast Way Without any APIS .. Just Copy The Function To Your Program and Use It .. That's an Example Program That Show's You How To Use Function .. Please Please , Send Me You Comments To My E-mail : la3toot@hotmail.com ; la3toot@yahoo.com .
According to feedback by several PSC'ers, this module is blowing away API .Ini calls speedwise. After I originally submitted it I became curious just how much faster the API calls were than my class in accessing .Ini files because I assumed APIs are always faster. So I found a millisecond timer class, and added that and an old API .Ini class that I had gotten from who knows where. I merged them into this project and ran some tests. I read somewhere on PSC that the API calls ran "at least 50 times faster" than pure VB equivalents (I can't remember who posted that comment). I had never doubted that remark because you can't beat APIs for speed (compared to pure VB). Then I ran some tests and saw that my class ran 18 times slower than the API class. I started tweaking my code and ended up with the screen shot you see below. These times are for an ancient 500 mHz Win98 machine. Many people with newer systems are reporting my class is MUCH faster than the API calls. I could shave a few dozen more milliseconds off these times by inlining more code but enough is enough. This was just a fun project to do and I thought some people here might be interested in these comparisons. I learned some code optimization techniques out of this project, anyway. If you spot any errors please let me know. Thanks.
This carefully designed VB CLASS encapsulates the following UNIX shell commands: CAT, HEAD, TAIL, >> (Append) and some more like GetUniqueTempFileName. With properties like FILTER (grep), CancelParsing, IgnoreLinesWith, LinesToHandle and some more handling of text files is easy and fast implemented into your current project. ____ A detailed example for every command is included. Error handling is fully implemented, comments are included and code is fine structured. If you are interested in "things behind": Have a closer look to the ring buffer technik used in TAIL() to save memory. btw: We DON'T load the whole file into memory, so even VERY large files can be handled (e.g. catch the last 50 lines from a 2 GByte logfile without any problems ;) ...) _______ Constructive comments are welcome - votes are motivating ;) ! ______ Regards__Light Templer_______________________________________________UPDATE 1 - Fixed the problem with empty 'IgnoreLinesWith' Update 2 - The check for missing path/filename was against the wrong var.
PLEASE NOTE THAT THIS IS NOT A DECOMPILER. All it does is that it converts files into ASM code. If anyone can build a decompiler that works, I'd be proud because it takes hard work to convert ASM code into VB code. OBSERVE POR FAVOR QUE ESTO NO ES UN DECOMPILER. Todo lo que lo hace es que convierte archivos en código del ASM. Si cualquier persona puede construir un decompiler que trabaje, sería orgulloso porque toma el trabajo duro para convertir código del ASM en código de VB.
File Finder v0.1 will scan an entire disk, a directory tree, or a single directory, searching for the file you specify. It is very fast, and can scan a whole 10gb disk in under a minute (roughly 30-40 seconds). It displays all the matches it finds by filename, path, size, and file date/time. During searches, it displays stats of what it has found so far for you, so you can keep an eye on what is happening. This version (0.1) is fully functional, but is limited in some areas, such as wildcard usage. Version 1.0 will be a fully funcional search program, with all the bells and wistles, so look out for it shortly. The code used in this program is loosely based upon my previous submission, Drive Indexer (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=53001&lngWId=1). If you like File Finder, please vote/comment. If I don't get enough interest, I won't bother with a new version.
Many peoples write to me that my hlp-Decompiler (see on PSC) make errors. So i test it and i think i found the error. I use a german system with Decimal = ",". On other systems Decimal = ".". So i change that and it works. I hope this helps. The code is small so i resubmit him. If someone find an other error please send the helpfile to me with a description.
This code replaces all features of the the FileSystemObject through the API for very fast access. Also provides fast API File I/O, file searching, _ALL_ special folders without slow late bound objects or unnecessary dependencies, and much, much more. All code here was written by me, and free for you to use in any way you find beneficial. As always, I ask only for bug reports and ideas on improvement.
I have come across several different solutions for testing for a file's existance, from Dir to opening the file, testing for error, then closing the file again. I remembered an article/comment by Bruce McKinney that influenced my solution to this problem and thought I would share it.
This program uses NTFS streams to save data in a hidden place of files. So your data is saved without any file-changes like size,attributes,contents or .... everything is like before you save data. It can be used to prevent file monitoring utilities like InCtrl5 or ... to track your file activities. YOU CAN SAVE & RETRIVE WITHOUT ANY CHANGE IN FILES. Pure VB code (No API or ..)
This simple app can decompile Windows-HLP-files if you lost your sources. It get rtf files, graphics, projektfile and so on. You can recompile it. A Desription of the HLP-Format is included.
Allows you to rename files en masse with some preset patterns. Added the ability to use the modification date in the numeric indexing pattern. (Press '?' for details) Replaced the browse for folder method with the control in http://ccrp.mvps.org/download/controls/ccrpftv6-10.zip Can now use the old filename in the numeric indexing pattern. I did have it in MR1 but thought no one used it. Fixed a critical error
Determine if a file exists and retrieve information about size, creation/modifed/access dates and file attributes, this could also be modified to retrieve version information as well. UPDATE: In Response to Solo's statement you can now also retrieve file version info and other information such as company name, file description, default language, etc.
This is an example of 'SaveText' - 'LoadText' functions for TextBoxes.It is easy to use and works smoothly. I Need your 'FeedBack' and never forget to -Rate- this code.
A clone of Microsoft's Scripting Runtime: FileSystemObject using API calls with a few additions and necessary changes. If you want total control over file access this is the object for you.
it's an application in which i use text files databse, yes......... when u work on it u feel that u work on a database project, but it's compleately text files database project, you learn soo many of things when you use this project beleave me..........
Gets the correct value for file sizes when the file is large (> ~2.1GB). Basically the file size function included in VB will give a wrong value when used on large files. The traditional way of getting the file size via API will also not work as detailed in the MS article http://support.microsoft.com/default.aspx?scid=kb;en-us;185476. After a bit of research I ended up tweaking the API function to calculate the proper file size. To see the differences, browse to a large file. Let me know if there are any bugs or suggestions to improve performance.
Shows you how to use files to store any type of data, in 4-5 lines of code you can save anything as a binary file. Of course, there is a button for opening them :), download it if you dont know how to use Put, Get, binary stuffs. In a 10 lines of code, you can make a small database, if you know how to handle binary files.
Compares a file's contents to a predefined byte-table. If a match is found, the file is classified as binary. I've extracted the byte-table from over 4500 different textfiles in both ANSI and ASCII standard (well over 200 Mb.) The bytes in the table do not occur in any of the following filetypes: .BAT, .TXT, .HTM, .INI, .JS, .BAS, .INC, .LOG, .VBP, etc. Because of this it's pretty plausible to state that if a file should contain any of the bytes in the table, it MUST be binary. I do not expect this routine to be 100% accurate but for the purpose of deciding whether to open a file in a text-editor or a hex-editor this will do just fine. please keep in mind that the original byte-table is a bit larger (mail me to get a list) but comparing the rest as well does not provide more accuracy and will lead to false interpretation of localized files.
*** UPDATED AND IMPROVED *** This will cut a large file into smaller pieces. For example if you have a 4MB email attachment limit, and you want to send a 40MB file, you can use this program to split the file into 10 pieces of 4MB each. It also generates a batch file to reconnect the seperate pieces.