User (Old forums)MemberJune 14, 2012 at 11:56 amPost count: 23064
Newbie here trying to extract tar.gz file in VB.NET 4.0. My source file is “C:\…\pickup\4NCrecords.SC_1337738401.tar.gz” and the target file inside is “C:\…\pickup\4NCrecords.SC_1337738401.csv”. The numbered part of the filename will change daily.
So far I have this from Xceed help files:
Public Shared Sub UnTar()
Dim diskFile As New DiskFile(“C:\My_Documents\NCID\DDS\SouthCarolina\data\pickup\4NCrecords.SC_1337738401.tar.gz”)
Dim gzip As New GZippedFile(diskFile)
Dim tar As New TarArchive(gzip)
Dim file As AbstractFile
file = tar.GetFile(“C:\My_Documents\NCID\DDS\SouthCarolina\data\pickup\4NCrecords.SC_1337738401.csv”)
If file.Exists Then
Thanks much for any help!
Imported from legacy forums. Posted by Bil (had 1530 views)Xceed SupportMemberJune 14, 2012 at 8:48 pmPost count: 5658
I’m not clear as to what your requirements are as there is no question. If you require any help with simple commands on tarring and untarring, you can always refer to the Xceed FileSystem Snippet Explorer. In the application, you will find various topics concerning the Xceed components that use the FileSystem architecture that we provide. You can find the application installed on your machine. If you have installed the component and left the directories to the default ones, then you should be able to find it here:
C:\Program Files (x86)\Xceed\Xceed Zip for .NET v5.1\Bin\Xceed.FileSystem.SnippetExplorer.exe
In the executable, you can quickly go to topic #5 for the use of the Tar classes. You can find an example for basic scenarios when dealing with tar files. Remember, you are not limited to the functionality shown in the snippet explorer. You can find more information in the online documentation. If you have any more questions, please feel free to ask!
Imported from legacy forums. Posted by Marc [Xceed] (had 222 views)User (Old forums)MemberJune 15, 2012 at 11:23 amPost count: 23064
Thank you Marc. Sorry for the confusing post. I misinterpreted the code I quoted from Xceed Help and now realize it means ‘delete’ the file, not ‘extract’. So yes, 5.7.2 (Extract from tar.gz archives) is right on point.
Currently I am struggling to understand the Xceed folder/file system, so I can point the code to a specific file/folder rather than the Temporary folder.
And the file name will change daily, i.e.: 4NCrecords.SC_1337727231.tar.gz, 4NCrecords.SC_133778479.tar.gz, etc.
Imported from legacy forums. Posted by Bil (had 288 views)Xceed SupportMemberJune 16, 2012 at 11:51 amPost count: 5658
You can also refer to this document from our online documentation here. In the example, you are explicitly stating where the file resides on. It is a much simpler example with more explanation as to what is being done and what is required. Is there a pattern as to how the file names are constructed? Knowing the file name is essential to the component so that it understands which file to extract.
I hope this makes it clearer for you!
Imported from legacy forums. Posted by Marc [Xceed] (had 1350 views)
- You must be logged in to reply to this topic.