VS 2008 Compressing / Decompressing Entire Folders

Apr 1, 2010

How do you do it? I've looked it up everywhere and failed to find anything. If there is a previous post I missed that discussed this, post it as a comment and forgive me. <scenerio>Friend and I are working on a VB project. We want to export and inport folders of information, and to do so neatly, we wanted to compress the files in the format we made for our program, then be able to decompress it within the program as well. If theres any other way to do this without compression and decompression

View 2 Replies


ADVERTISEMENT

Compressing Multiple Sub Folders?

Oct 26, 2011

I've written a backup utility for one of our applications; this process involves coping sub directories of a specified base folder and an unknown number of folders within folders. I've got the process down to copy the files and directories pretty easily but I want to compress the folder structure to keep the space needed as small as possible.I've found a few utilities that work well for getting the files from the specified base folder but not any of the folders that exist in the specified start directory.The one utility I found required me to recursively search directories for the variably named directories and I am hoping for a simple switch that can be used that says base folder/file and sub directories.

View 1 Replies

[2008] Decompressing A Zip Works But Where Is The File?

Jan 20, 2009

First of all I am not a really experienced programmer, sorry for that. I try to do my best.So far my application is succeeding: it can create a directory for itself download a file from the internet, rename it to the matching unique id for the user, replace the file and backup the old one.

THe problem I now have that the file to download is 22mb, with .rar it's only 3mb. Zo I tried to zip it (also worked) but now I need my application to decromress it. After a lot of search I found this method from MSDN:

[Code]...

View 1 Replies

VS 2008 GetFiles - Skip Folders & Continue Reading The Rest Of The Folders?

Feb 1, 2010

It appears that when IO.Directory.GetFiles tries to read a folder that it doesn't have access to it throws an exception & stops reading. Is there any way to have skip those folders & continue reading the rest of the folders?

View 1 Replies

VS 2010 Decompressing A Byte Array?

Nov 24, 2011

I have read a byte array called compressed_byte_array() from a file. This array is compressed using the zlib compression Deflate (RFC1951).

How would I decompress this array and store it in another array, let's say decompressed_byte_array(). I probably have to use DeflateStream and I have tried a few methods, but always ending up with a error message.

View 4 Replies

.net - Listing Folders In Folders - Then Creating Arrays In JS For Each Of The Folders ?

Jun 21, 2010

I have a directory structure as follows;

ad_folder
--folderA
--folderB
--folderC[code]....

at I do not know the number of or the names of the folders, they can be different in different cases, I only have the root path.how I can display folder contents in VB.net and the code worked but couldn't figure out how to create the arrays and display only folders within folders starting with "ad_".

System.IO.DirectoryInfo and System.IO.FileInfo to be used for getting the folders.A literal control can be used to create javascript arrays in ASP.NET. These js arrays can then be used on the client side.

View 3 Replies

Decompressing LZSS - Data Stored In A Byte Array

Dec 28, 2009

I have some data, stored in a byte array, compressed with LZSS compression. I've crawled the net for the last 2 days trying to find some code to decompress this data without success. Has anyone come across a suitable routine that can help?

View 2 Replies

Compressing RTF For Database

Aug 22, 2011

I am developing an application where the user saves a chosen RTF file to a SQL Server database. My problem is that if the file contains an image, the binary becomes too big. Although the database has enough space, it's not very nice to use up space you could save.... To give an example:

[Code]...

View 2 Replies

Compressing RTF For Database?

Aug 22, 2011

I am developing an application where the user saves a chosen RTF file to a SQL Server database. My problem is that if the file contains an image, the binary becomes too big. Although the database has enough space, it's not very nice to use up space you could save....To give an example:

RTF binary with two text lines ("ABC / efg") = 156 Bytes
Same 2 lines + 32 kB image = 2.2MB

I am still confused on which is the best way to solve this. I have thought about creating an "images" table in my database and using a markup to fetch the image when the file is loaded.

View 8 Replies

C# - Worth Compressing The ViewState?

Nov 16, 2010

I agree that the best way to shorten the ViewState is to disable it on the ASP.Net controls that don't need it. Keeping it small from the beginning is a great habit.I have also heard that it is already compressed (although can be true... there are ways of compressing it even more, has described in this Stack Overflow question).

My question here is not if it should be compressed... is: when should ViewState be compressed?If we have a ViewState of 410 characters it will weight 410 bytes in a page, while a ViewState of 13.843 characters equals 13.5 KB.

13.5KB is a considerable weight already. And if I compress a CSS file that height 10KB, I think it is also worthy compressing a ViewState of 13.5KB, even if that means a little extra "thinking" on the server.

But is 410 bytes of ViewState worth the extra processing on the server?At what point is it worth compressing?

View 2 Replies

CGZIPLibrary.dll Not Compressing Files?

May 27, 2011

I am using CGZipLibrary.dll in my code for zipping the files. A .zip file is being created but the file is not getting compressed. The original file and the .zip file are of same size.

View 1 Replies

Compressing A Stream Rather Than A File?

Apr 3, 2010

I've downloaded ZLIB.NET from here and the example VB.NET code they provide works fine. It's very short so I'll paste it here for reference:

vb
Public Shared Sub CopyStream(ByRef input As System.IO.Stream, ByRef output As System.IO.Stream)
Dim num1 As Integer

[Code]...

Note that the CopyStream() subroutine is identical. The problem is that although decompressing seems to work fine, compressing does not. If I take a byte stream, compress it and then decompress it using the above code, I get a truncated version of the original stream (as an example, a 360485 byte stream becomes 311518 bytes). The resulting bytes match the original stream up until the point where it's cut off.

The only information I can find about streams being truncated is due to missing stream.Flush() commands but the output stream is flushed in the CopyStream() subroutine.

View 5 Replies

Compressing Memory Streams?

Jun 24, 2009

I have this code for compressing datasets into files:

Using fs As New System.IO.FileStream(flnm, IO.FileMode.OpenOrCreate, IO.FileAccess.Write, IO.FileShare.Write)
Using zStrm As New System.IO.Compression.GZipStream(fs,

[code].....

View 1 Replies

Compressing Sql Server Data Across Vpn?

Aug 16, 2009

compressing sql server data (on the fly) from a select statement when accessed across the internet. i.e data is stored in Sql Server Express on a remote computer (1) connected via an Internet VPN. An application on a remote computer (2) on the same VPN sends a select statement to the SQL server machine.The data would then be compressed at computer (1) sent across the VPN and decompressed at computer (2)

The Reason is, broadband speeds are not the greatest in Australia, and it would reduce the size of the data transmitted, resulting in faster response, as the compression/decompression is done at each machine

View 1 Replies

Treeview To List Folders Then Display The Folders Context In A Listview?

Sep 22, 2010

I have seen lots of examples with a treeview to list folders then display the folders context in a listview.

But what id like is a checked treeview, that not only displays the folder list, but the actually folder contents as well.

View 2 Replies

Filling Listbox From Folders But Limit It 2 Folders Deep

Mar 13, 2010

I use the code below to fill the list box and it works great. But i need it to only look in the \Software and \Software\FolderName Foldername could be any folder in the Software folder i need it to get all the .exe from software folder and only one more folder deep no more.

[Code]...

View 3 Replies

How To Create A Program That Can List Files, Folders And Sub Folders

Apr 7, 2010

I need help with file enumeration. I'm trying to create a program that can list files, folders and sub folders locations in a log file for diagnostic purposes. After it searches it can open notepad and display the results. The problem I'm having is that I'm a beginner and not familiar with file enumeration.

View 14 Replies

Compressing A Database To A Single File?

Jun 4, 2010

In my contact manager program I have been storing information by reading and writing comma delimited files for each individual contact, and storing notes in a file for each note, and I'm wondering how I could go about shrinking them all into one file effectively. I have attempted using data entry tools in the visual studio toolbox and template class, though I have never quite figured out how to use them. What would be especially convenient is if I could store data as data type IOwner (a class I created) as opposed to strings.

I'd also need to figure out how to tell the program what to do when a file is opened (I've noticed in the properties how to associate a file type with the program though am not sure how to tell it what to do when it's opened).

Edit:

How about rephrasing the question: I have a class IContact with various properties some of them being lists of other class objects. I have a public list of IContact. Can I write Contacts as List(Of IContact) to a file as opposed to a bunch of strings?

Second part of the question: I have associated .cms files with my program. But if a user opens the file, what code should the program run through in an attempt to deal with the file? This file is going to contain data that the program needs to read, how do I tell it to read a file when the program is opened vicariously because the file was opened?

View 2 Replies

Compressing Normal Files Into A EXE Created By VB?

Apr 2, 2009

I am need of creating a windows executable that contains a compression of certain other binary files, (executables etc)

It is a basic form with a button, on press of the button, it has to decompress certain binary files( some other executables too) into a certain path, the decompression happens based on some specific conditions and not always., This is the reason I could not use WinZIP to create the EXE.

View 3 Replies

VS 2008 - Upload An Entire Folder Via Ftp

Jul 28, 2009

I need to upload everything inside a folder via ftp in visual basic. Does anyone know how to do this?

View 6 Replies

Storing Files Into An Application Compressing Them And Then Extracting Them?

Apr 8, 2009

How could I go about doing this if I can? Storing files into an application compressing them and then extracting them?

View 1 Replies

2008 - Print Entire Form On The Screen

Jan 15, 2009

I have a user who wants to print the form that is on the screen(the entire form not just the data) on the click of a button, is there a quick and easy way to capture it and print it. Kind of like a screen shot? I suggested that they could just do alt/printscreen and capture the form that way and print it but they want it all to be done from a print button for them.

View 14 Replies

VS 2008 Rename An Entire Project / Save As?

Feb 6, 2012

I want to rework and rename an existing application and utilize everything I've already done -- but it looks like it isn't going to be that simple?One post suggested renaming the folder, plus the project and another subfolder but when I opened that folder there were another 7 or 8 files that also needed changing.I DON'T want to do anything that will create a conflict and if I'm going to change to newname from oldname, I don't want to see "oldname" popping up anywhere..Is there a safe way to rename and reuse an exisitng project? Without anything being left out ?

View 2 Replies

VS 2008 Write Entire Table To An XLS File

Aug 12, 2009

I coded in it along time ago, back in middle of the 90's, but not heavily, so I don't remember that much, and never really worked with databases or file import/export. I'm trying to write code in to take my table or recordset thats active and export it to a XLS file.

[Code]...

View 1 Replies

VS 2005 - Compressing A Dataset Converted To XML Using The GZipStream Class Added In 2.0

Mar 25, 2009

I am compressing a dataset converted to XML using the GZipStream class added in 2.0. There are a few things bothering me about this. Here's the code I am using to decompress the XML file:

Using inFile As New System.IO.FileStream(flnm, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read)
Dim zStrm As New System.IO.Compression.GZipStream(inFile, IO.Compression.CompressionMode.Decompress)
Dim buff(999) As Byte

[CODE]...

This seems inordinately awkward, as I am taking the stream, reading it out into byte buffers, then writing those byte buffers to a memory stream that is then passed to the dataset.ReadXml() method. The reason for this seems to have to do with what is happening in the line colored red. That line is adding a closing > onto the end of the stream. Without that, ReadXml complains about an unclosed dataset. I found out that the > was missing by writing the stream into a string and pasting the string into WordPad. Without that missing >, it appears that I wouldn't need to be using that memory stream at all, and could simply pass in the GZipStream to ReadXML, but as far as I can tell, it's impossible to look at the GZipStream to be sure that the > is not there, and it may be impossible to add it (I haven't tried).

So why is the > missing? Here's the code used to create the file that is being read into the filestream in the above

VB Using ms As New System.IO.FileStream(flnm, IO.FileMode.OpenOrCreate, IO.FileAccess.Write, IO.FileShare.Write)
Dim zStrm As New System.IO.Compression.GZipStream(ms, IO.Compression.CompressionMode.Compress)

ds.WriteXml(zStrm, XmlWriteMode.WriteSchema)
End Using

The real kicker to all of this is that while I was dissecting the first chunk of code, I added a line to check for cnt<1000. My intention was to see the last buffer that was being written into the memory stream to see whether the final > was actually there, or not. To my surprise, I reached the cnt<1000 twice. That means that one read did not read a full 1000 bytes, but read only 675. The next three or four reads were a full 1000 bytes, then the final read was just a few hundred bytes. It is my understanding that Read will return a full buffer if there are that many bytes left to read, and there were, so why did it return only a partial buffer? That suggests that there might be a hole in my XML, though with a half meg file, it's a bit much to read through it looking for something missing. However, the XML that was returned was turned into a dataset that I then merged into some existing data using code that has been working with uncompressed XML files, and I got an error that I should never have received. That may indicate that the XML was, in fact, missing something, though I will have to study the matter further to figure out whether or not that is the case. My major question has to do with the missing '>' at the very end of the file.

View 2 Replies

VS 2008 - Showing Entire Contents Of Items In ListView Tooltips

May 18, 2011

I can't claim credit for this code but I think it's cool. It will show the entire contents of an item in a tooltip even when the columns are truncating it. Drop a tooltip and listview container on your form with the default name.

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListView1.Clear()
ListView1.View = View.Details
[Code] .....

View 1 Replies

VS 2008 Any Coding For Which It Disables Entire Form Until Process Is Completed?

Jul 23, 2009

My form contains lots and lots regular expression and other things in one button. whch when pressed takes some time to process.. so the form kind of gets stucked while the processing is bieng done.is there any coding for which it diables the entire form until the process is completed? like disabling the entire form and showing a text "please wait ... processing data" so user can not use other buttons or features at the same time or it might get crashed.

View 5 Replies

VS 2008 - Get DataGridViews Entire Column To Become Disabled And Won't Let The User Click On The Checkboxes

Aug 23, 2011

I have a dgv with a column type = DataGridViewAutoFilterCheckBoxColumn. I want to know if there's a way to I can get that entire column to become disabled (or Enabled = False) so it won't let the user click on the checkboxes. I tried looking in the "Bound Column Properties" but there isn't an option to disable the entire column.

View 2 Replies

VS 2008 - Add Folders In Resources?

Dec 30, 2009

Is it possible to add folders to resources?

View 4 Replies

VS 2008 Add Buttons To Panel, Button/tab References Create/destroy Entire Tabs/layouts?

Feb 18, 2010

I need to know how to have a button on a tab to create another button on a second tab that contains a panel, with appropriate spacing, the same size as other buttons already present, and the name of the tab that generated this new button as the text on the newly created button. I.e. button1 on tab1 will create and place a new button on a panel in tab2 that already has a grid of buttons (maybe 3x10 buttons) which will be placed underneath a particular column with the text tab2 on the new button which can also refer back to that tab automatically. Hopefully we can get all this code under a single button event.

I also don't know how to have a button on tab1 that focuses on tab2, which sets the back button on tab2 with a reference to go back to tab1 in order to remain dynamic. I.e. clicking on tab1's button will go to tab2 and set the back button there with a link back to the tab it was referred from.

I'd also like to know if there's an easy way to create and destroy tabs with a specific layout. I.e. We have home tab, and comment tab. (This is for the sake of argument) On the comment tab1 (which contains all posted comments), we have a new comment button which creates a comment tab2 (or a dialog box for that matter) with appropriate textboxes, labels, and buttons in the right places which could also make use of the issues I posted above. So the new comment button on the comment tab1 will create either a new comment tab2 with appropriate objects, or a dialog box with the same, and then the submit button on this comment tab2 or box will create a new textfield/buttons on the panel containing the grid of buttons with the information provided in the fields from comment tab2/dialog box which is then destroyed.

I hope i haven't made the examples too confusing, but I can't figure out how to even make progress in these directions. Trying either fails completely, or semi-fails in getting these examples to function 100%.

I've already tried posting in other forums, but with no replies. Hopefully you all can help me figure this out.EDIT: This is not homework, I have scoured forums and google trying to find the answer to these problems. I'm hoping that because these are mainly VB based forums I can find some answers here.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved