How to tar a folder into a tar file
I have a folder on my local system which I want my Java code to tar. But I want to also add a file filter so that only one particular subfolder gets added into that tar. How do I do that. How do I create an OutputStream to tar.
e.g Say I have the architecture like
C:/MainFolder
|-subfolder1
|-subfolder2
|-subfolder3
I want to tar MainFolder such that only the subfolder1 is included in the tar.
How do I do that?
You'll have to look for a 3rd party lib that produces TARs. The core distribution only supports ZIPs.
Similar Messages
-
I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?
Gary116 please remove and reinstall Lightroom by following the steps listed in CC desktop lists applications as "Up to Date" when not installed. The version of Photoshop Lightroom available through the Creative Cloud Desktop application supports your Creative Cloud Membership.
-
I have three websites in one file. How do I separate them into three individual files?
I have three websites in one file (Domain.Sites2). How do I separate them into three individual files without taking the site down or loosing files?
Duplicate the domain file 3 times (keeping the orignal as a backup). Name each domain file for the website you want it to contain. Then open each domain file and delete the two sites you don't want it it.
Since you're running Mt. Lion you'll need to read the following in order to be able to open the different domain files.
In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.
To open your domain file in Lion or Mountain Lion or to switch between multiple domain files Cyclosaurus has provided us with the following script that you can make into an Applescript application with Script Editor. Open Script Editor, copy and paste the script below into Script Editor's window and save as an application.
do shell script "/usr/bin/defaults write com.apple.iWeb iWebDefaultsDocumentPath -boolean no"delay 1
tell application "iWeb" to activate
You can download an already compiled version with this link: iWeb Switch Domain.
Just launch the application, find and select the domain file in your Home/Library/Application Support/iWeb folder that you want to open and it will open with iWeb. It modifies the iWeb preference file each time it's launched so one can switch between domain files.
WARNING: iWeb Switch Domain will overwrite an existing Domain.sites2 file if you select to create a new domain in the same folder. So rename your domain files once they've been created to something other than the default name.
OT -
How do I put text into an Edge File that clients can edit easily afterwards
Hi
Can anyone explain how I can put text into an edge file (styled with google fonts) and make it so that clients can access the text and update the text as they require?
Previous suggestion was dynamically loading a .txt file - any instructions would be most appreciated.
Thanks.Hi Resdesign!
Your code is very useful to learn how to use Json in Adobe Edge Animate!
But I have a question: why you use ( i ) as argument of the function UpdateInfo and when you recall it you use ( index )?
$.getJSON('slides.json', function(data){
//for(var i=0; i<data.length; i++){
function updateInfo(i){
sym.$("photo").css({"background-image": "url('"+data[i].image+"')"});
sym.$("pillar").html(data[i].pillar);
sym.$("what").html(data[i].what);
// position
index = -1;
sym.$("btn").click(function(){
index++;
if (index>=5){
index = 0;
updateInfo(index);
Many thanks for your attention!
Davide -
I need to know how to "compress" the Folder Tree. The File folders are moving to the right and out of sight in Lightroom 5.
A couple of suggestions that may help:
- Make sure you've made the left-hand column as wide as possible by grabbing the divider between the column and the Library grid view.
- You can hide a parent folder from the display by right-clicking it and selecting Hide This Parent. This will shift all the child folders to the left. -
How to scan more pages into one PDF file using hP inkjet 2515
Dear friend
How to scan more pages into one PDF file using hP inkjet 2515Dear friend
How to scan more pages into one PDF file using hP inkjet 2515 -
I have a Probook running 10.7.5 and have compressed the 60Gb MobileSync folder into a zip file that is... 60Gb, the original file is still there so I have just lost another 60Gb of space. What's going on?
Habibullah Allah Yar.
Kabul Afghanistan.
Head of Green Shaheen Group of Company's.
Website: www.gsls-c.com.
<Personal Information Edited by Host> -
How to write input data into an xml file
Hi All,
I have some input data and i have to write it
into an xml file.How is it possible send me some related
links regarding this and source code if any.Hi
Try to go through these links.I hope this will help you to solve your problem.
http://www.xml.com/pub/a/2003/07/09/udell.html
Thanks
Mrutyunjaya Tripathy -
How to export special characters into an XML file?
Dear experts,
We read files from our customers and save data into our customized table without any character changed, including some address fields. In those address fields, some special characters (not in our code page) are also kept. When we want to write these address fields into an XML file or flat file, the special charcters become "##" or not readable, can anyone help us to solve this issue?
Question1: How to write special code to an external file?
Question2: how to use 'CALL TRANSFORMATION' from an internal table to an XML file?
Your answer is highly appreciated!
JoanneHi Joanne.
Please check the below link.
CALL TRANSFORMATION
Before that u have to create one transformation program in STRANS tcode for using it in call transformation statement.
Hope it will be useful.
Regards,
Lakshman -
How to put selected videos into one place (File)
How to put selected videos into a File so I can only show on TV the videos in that file
YYou have to describe your issue in more detail. Are you using iTunes? Trying to see it in Apple TV, etc, etc.
-
In this tutorial you'll learn how to convert a web page or entire website into a PDF file using Acrobat X or XI Std. or Pro.
http://adobe.ly/zFONn4How can i generate pdf from website which requires logon (2 level)?
-
How to split column wise into separate flat files in ssis
IN SSIS...
1.---->I have a sales table country wise regions like (india, usa, srilanka) ....
india usa
srilanka
a b
c
d e
f
so i want output like in
flat file1.txt has india flat file2.txt has usa flat file3.txt has srilanka
a b
c
d e
f
2.----->i dont know how many regions in my table....dynamically split into separate flat files ....
pls help me.....thank uI think what you can do is this
1. Do a query based on UNPIVOT to get the data as rows instead of columns
For that you can use a query like this
IF OBJECT_ID('temp') IS NOT NULL DROP TABLE temp
CREATE TABLE temp
Country varchar(100),
Val decimal(25,5)
DECLARE @CountryList varchar(3000),@SQL varchar(max)
SELECT @CountryList = STUFF((SELECT ',[' + Column_Name + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<SalesTableNameHere>' FOR XML PATH('')),1,1,'')
SET @SQL= 'SELECT * FROM <SalesTableNameHere> t UNPIVOT (Val FOR Country IN (' + @CountryList + '))p'
INSERT temp
EXEC (@SQL)
Once this is done you'll get data unpivoted to table
Then you can use a execute sql task with query like above
SELECT DISTINCT Country FROM Temp
Use resultset option as full resultset and store the result to an object variable
Then add a ForEach loop container with ADO enumerator and map to the object variable created above. Have variables inside loop to get inidvidual country values out.
Inside loop place a data flow task. Use a variable to store source query , make EvaluateAsExpression true for it and set Expression as below
"SELECT Val FROM Temp WHERE Country = " + @[User::LoopVariable]
Where LoopVariable is variable created inside loop for getting iterated values
Inside data flow task place a oledb source, choose option as SQL command from variable and map to the above query variable.
Link this to flat file destination create a flat file connection manager. Set a dynamic flat file connection using expression builder. Make it based on a variable and set variable to increment based on loop iteration
The core logic looks similar to this
http://visakhm.blogspot.ae/2013/09/exporting-sqlserver-data-to-multiple.html
dynamic file naming can be seen here
http://jahaines.blogspot.ae/2009/07/ssis-dynamically-naming-destination.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to add a directory into a jar file
Hi, guys, I want to add a package into a jar file. For example, my dirctory structrue
is org/test/, all files locate in the directory test, in org.test package. I want to
add the package into a jar file, test.jar. I use "java -cvf test.jar -C org/test/ .
But it says "jar: no match". How can I solve it.
thanksInstead of 'java', use 'jar'.
All in all, try this: jar cvf test.jar -C org/test/*.class.
Have a nice day! -
How to write the errors into a specific file
Hi all,
How to handled the errors in the scenarios,By using fault messages we can informed about errors to sender.But in my case i have to gather all errors & write into a specific file.For this can i create another Communication Channel for File reciever.How can i gather error messages in the scenario.
Early response is appreciateHi,
Bhavesh had already answered how to handle it. For saving it in a file yes you can use File Receiver adapter.
Regards,
Prakash -
How to write the resultset into a text file
how to write the resultset into a text file
You can use the java.io.* package to write to files.
API: http://java.sun.com/j2se/1.5.0/docs/api/java/io/package-summary.html
Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/index.html -
How to save VISA information into a configuration file
Hi guys,
I've got a problem that i can't quite figure out and I'm sure someone else has done this but i have searched the forums and didn't find anything suitable myself.
I'm trying to save configuration files for my program and then reload them back in so that i can get the same state of the controls. One of the controls I'd like to save into the configuration file is a VISA control. has anyone figured out how to save this into configuration files? I know that OpenG has a write variant to config but Id like to stay away from 3rd party stuff as much as possible. Does anyone have any suggestions as to how to get around this?
Thanks
Brent
Solved!
Go to Solution.The alternative to Write Keys, if you don't want a text file, is a BIN file. I do it this way when I don't want users poking around text file trying to change things, and/or for security. And it's fast.
The attached picture shows, in general, how to do it.
Richard
Attachments:
saveSettings.gif 11 KB
Maybe you are looking for
-
Character count display problem in IE
Hi all, I have implemented a character counter in ADF using Javascript (referencing this http://www.oracle.com/technetwork/developer-tools/adf/learnmore/10-char-input-counter-169133.pdf). The problem that I am facing is: when my character counter bec
-
Solaris 10 support for J2SE 1.4.2_06?
As in, does it? I managed to find a reference to 1.4.2_07 being tested on Solaris 10, but haven't found anything for 1.4.2_06... Any ideas? Whats the official policy from Sun? And could we perchance have a compatibility chart on the site showing whic
-
Matreial Number/Part number sits on short text column instead of Mat# colum
Hi Experts, When i am createing a PO for repair or warranty, Part number sits in short text column instead of Material number column. Tcode ME21N....not sure why. Please suggest if its a config thing or can be solved in ABAP... Thank you in advance.
-
Metadata integrator-configuration problem
hi.. i'm just exploring the meta data integrator. when i configure the cms with my login and the DI repo with the local repository. it says success. but when i run the job it says the following error.. [CrystalCrawlerMain]configuration <config_new> n
-
Transports from PRD to QAS & DEV in SEM?
Hi, I am in a strange situation. we are on BW 3.0B and SEM 3.1B. For some reasons, My predecessor who worked b4 me implemented SEM planning without DEV system and without transports. I've been told that they are not developing any thing in DEV system