How to list the contents of an OSX directory, and output to text file?
hello there any hints with any known program that does following
I have recorded my music directory to DVD and now i would like to make an .txt file what the dvd contains...cos its way of hand to write all 100xx files by hand...
How to list the contents of an OSX directory, and output to text file?
any prog that does that? any hints?
best regards
This script makes a hierarchical file listing all files in a folder and subfolder:
Click here to launch Script Editor.
choose folder with prompt "Choose a folder to process..." returning theFolder
set theName to name of (info for theFolder)
set thepath to quoted form of POSIX path of theFolder
set currentIndex to theFolder as string
do shell script "ls -R " & thepath returning theDir
set theDirList to every paragraph of theDir
set newList to {"Contents of folder \"" & theName & "\"" & return & thepath & return & return}
set theFilePrefix to ""
repeat with i from 1 to count of theDirList
set theLine to item i of theDirList
set my text item delimiters to "/"
set theMarker to count of text items of thepath
set theCount to count of text items of theLine
set currentFolder to text item -1 of theLine
set theFolderPrefix to ""
if theCount is greater than theMarker then
set theNestIndex to theCount - theMarker
set theTally to -1
set theFilePrefix to ""
set theSuffix to ""
repeat theNestIndex times
set theFolderPrefix to theFolderPrefix & tab
set theFilePrefix to theFilePrefix & tab
if theTally is -1 then
set theSuffix to text item theTally of theLine & theSuffix
else
set theSuffix to text item theTally of theLine & ":" & theSuffix
end if
set currentIndex to "" & theFolder & theSuffix
set theTally to theTally - 1
end repeat
end if
set my text item delimiters to ""
if theLine is not "" then
if word 1 of theLine is "Volumes" then
set end of newList to theFolderPrefix & "Folder: > " & currentFolder & return
else
try
if not folder of (info for alias (currentIndex & theLine & ":")) then
set end of newList to theFilePrefix & tab & tab & tab & "> " & theLine & return
end if
end try
end if
end if
end repeat
open for access file ((path to desktop as string) & "Contents of folder- " & theName & ".txt") ¬
with write permission returning theFile
write (newList as string) to theFile
close access theFile
Similar Messages
-
How-to list the contents of a Data Pump Export file?
How can I list the contents of a 10gR2 Data Pump Export file? I'm looking at the Syntax Diagram for Data Pump Import and can't see a list-only option.
Regards,
Al Malinuse the parameter SQLFILE in the impdp which writes all the sql ddl's to the specified file.
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm
SQLFILE
Default: none
Purpose
Specifies a file into which all of the SQL DDL that Import would have executed, based on other parameters, is written.
Syntax and Description
SQLFILE=[directory_object:]file_name
The file_name specifies where the import job will write the DDL that would be executed during the job. The SQL is not actually executed, and the target system remains unchanged. The file is written to the directory object specified in the DIRECTORY parameter, unless another directory_object is explicitly specified here. Any existing file that has a name matching the one specified with this parameter is overwritten.
Note that passwords are not included in the SQL file. For example, if a CONNECT statement is part of the DDL that was executed, it will be replaced by a comment with only the schema name shown. In the following example, the dashes indicate that a comment follows, and the hr schema name is shown, but not the password.
-- CONNECT hr
Therefore, before you can execute the SQL file, you must edit it by removing the dashes indicating a comment and adding the password for the hr schema (in this case, the password is also hr), as follows:
CONNECT hr/hr
For Streams and other Oracle database options, anonymous PL/SQL blocks may appear within the SQLFILE output. They should not be executed directly.
Example
The following is an example of using the SQLFILE parameter. You can create the expfull.dmp dump file used in this example by running the example provided for the Export FULL parameter. See FULL.
impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmpSQLFILE=dpump_dir2:expfull.sql
A SQL file named expfull.sql is written to dpump_dir2.
Message was edited by:
Ranga
Message was edited by:
Ranga -
How to list the content of a URL
Hi All,
I am wondering whether the method of listing the content of a URL, is the same as listing a directory on a local system? The listing of a local directory can be achieved with the following code for example:
File dir = new File("directoryName");
String[] children = dir.list();
if (children == null) {
// Either dir does not exist or is not a directory
} else {
for (int i=0; i<children.length; i++) {
// Get filename of file or directory
String filename = children;
// It is also possible to filter the list of returned files.
// This example does not return any files that start with `.'.
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
return !name.startsWith(".");
children = dir.list(filter);
// The list of files can also be retrieved as File objects
File[] files = dir.listFiles();
// This filter only returns directories
FileFilter fileFilter = new FileFilter() {
public boolean accept(File file) {
return file.isDirectory();
files = dir.listFiles(fileFilter);However, I am not sure whether it is as simple as replacing "directoryName" with "http://www.abc.com/photos" when using java.net.*.
I am automating a task to download all photos in a gallery at certain website.
Any assistance would be very much appreciated.
Many thanks,
JackHi paulcw, JoachimSauer,
Thanks for answering to this post.
I am only trying to automate some downloads of quite a of photo albums of relatives overseas. It only takes a few weddings to take hours to download. Moreover, the reason for having made the photos on the Internet so that the relevant parties can do their own download at their convenience for free as opposed to costing the individual to spend time and money on burn dozens of DVDs... After all, this is information age we are living in.
Lastly, I am hoping to use the getContentType() method to determine the exact type of image such as jpg, gif, etc but doesn't appears that it is doing the right job. Is there any other way to do this instead?
Thanks a lot again,
Jack -
Is there a way to list the contents of a particular directory?
Hi,
I'm creating the blue-print of a new iPad app and was wondering if there was a way to request the contents of a particular directory (eithre local to the device or a a particular directory on the web) and also get the "type" of each item.
For example if inside a directory "Directory1" and inside that directory I have 4 files and another directory, (file1.gif, file2.txt, file3.mov, file4.mp3, Directory2)
Is there a way to request the contents of Directory1 and the type of files they are?
The ideal thing will be to get a recursive request and get an array of contents of all directories inside a particular directory.
something like:
Directory1[file1a.gif,file1b.txt,file1c.mov,file1d.mp3,[Directory2[file2b.mov,fi le2b.mp3]]]
What I want is to create a navigation for the user based on the resultant strign.
Am I re-inventing the wheel here?
Any direction will be greatly appreciated. I rather adjust blue-print now based on what is possible.
Thanks!We are users here. You might have better luck going to the developers forum.
http://developer.apple.com/devforums/
There are also links on that page that may help too. -
How to Delete the content of an existing site and start from scratch
I choose the wrong template when i initially setup my bc hosting for a customer how do i change the template i choose in site options and select a different one . I need to delete everything and stat over. I tried deleting everything under the develop area but lost my module style sheets for the eCommerce package. please help. Im on the business catalyst platform
Hi Joey,
Good to see that we are not the only ones running into this problem.
Seems as there is no standard solution available.
We have developed our own process type which deletes the content of the Open Hub table.
Thanks,
Klaus -
How to download the Contents of Spool Requests as one line into Local File
Hello All,
I am running a report (Tcode- MC40)in background and i want to download the output from Spool list .
but the issue with me is, in spool the contents are displaying in 2 rows, where as i want to downlod the details in 1 row by filtering some fields as per my need. There is no option to download SINGLE LINE / DOUBLE LINE as like if i run in foreground .
If i run it In Foreground , there is option to see the ouput in SINGLE LINE/DOUBLE LINE ... Same way i want to downaload the spool in background , as the report takes much time , so it has to run in back ground...
anyone please suggest any idea ??
Thanks all.try :
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = i_spools-rqident
first_line = 1
last_line = 0
desired_type = ' '
IMPORTING
real_type = real_type
sp_lang = sp_lang
TABLES
buffer = so_ali
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8. -
How to generate complete file list of hard drive and output to text file
I need to start backing things up to drives, which over time will be put in storage.
I would like to be able to create a complete file index and folder tree of every drive and have it output to a text file so that in the event I ever need to go back to a drive, I can search the text file to know what drive to pull from storage (rather than using spotlight to search through 25 drives).
Is there any way to do this with either OS X or with a third party software? Ideally, text file and not PDF.
Thanks!You can use the terminal.app with the following command:
rsync -rlptn --stats --progress +Source.. Destination..+
example with actual output:
rsync -rlptn --stats --progress /Volumes/Mac\ Data/websites /Volumes/EXT\ SATA2building file list ...
146 files to consider
websites/
websites/.DS_Store
websites/bestelectricbill.com/
websites/bestelectricbill.com/.DS_Store
websites/bestelectricbill.com/211299c1
websites/bestelectricbill.com/awards.php
websites/bestelectricbill.com/careers.php
websites/bestelectricbill.com/category1.php
websites/bestelectricbill.com/category2.php
websites/bestelectricbill.com/category3.php
websites/bestelectricbill.com/checkout.php
websites/bestelectricbill.com/company.php
websites/bestelectricbill.com/contactus.php
websites/bestelectricbill.com/email.js
websites/bestelectricbill.com/faqs.php
websites/bestelectricbill.com/fsp.js
websites/bestelectricbill.com/history.php
websites/bestelectricbill.com/index.php
websites/bestelectricbill.com/index_copy.php
websites/bestelectricbill.com/investors.php
websites/bestelectricbill.com/job1.php
websites/bestelectricbill.com/job2.php
websites/bestelectricbill.com/job3.php
websites/bestelectricbill.com/job4.php
websites/bestelectricbill.com/job5.php
websites/bestelectricbill.com/managementteam.php
websites/bestelectricbill.com/news1.php
websites/bestelectricbill.com/news2.php
websites/bestelectricbill.com/news3.php
websites/bestelectricbill.com/news4.php
websites/bestelectricbill.com/news5.php
websites/bestelectricbill.com/newsandevents.php
websites/bestelectricbill.com/partners.php
websites/bestelectricbill.com/press.php
websites/bestelectricbill.com/privacypolicy.php
websites/bestelectricbill.com/product1a.php
websites/bestelectricbill.com/product1a1.php
websites/bestelectricbill.com/product1a2.php
websites/bestelectricbill.com/product1b.php
websites/bestelectricbill.com/product1b1.php
websites/bestelectricbill.com/product1b2.php
websites/bestelectricbill.com/product1c.php
websites/bestelectricbill.com/product1c1.php
websites/bestelectricbill.com/product1c2.php
websites/bestelectricbill.com/product1d.php
websites/bestelectricbill.com/product1d1.php
websites/bestelectricbill.com/product1d2.php
websites/bestelectricbill.com/product1e.php
websites/bestelectricbill.com/product1e1.php
websites/bestelectricbill.com/product1e2.php
websites/bestelectricbill.com/products.php
websites/bestelectricbill.com/productsearch.php
websites/bestelectricbill.com/registration.php
websites/bestelectricbill.com/search.php
websites/bestelectricbill.com/searchresults.php
websites/bestelectricbill.com/service1.php
websites/bestelectricbill.com/service1a.php
websites/bestelectricbill.com/service1a1.php
websites/bestelectricbill.com/service1a2.php
websites/bestelectricbill.com/service1b.php
websites/bestelectricbill.com/service1b1.php
websites/bestelectricbill.com/service1b2.php
websites/bestelectricbill.com/service1c.php
websites/bestelectricbill.com/service1c1.php
websites/bestelectricbill.com/service1c2.php
websites/bestelectricbill.com/service1d.php
websites/bestelectricbill.com/service1d1.php
websites/bestelectricbill.com/service1d2.php
websites/bestelectricbill.com/service1e.php
websites/bestelectricbill.com/service1e1.php
websites/bestelectricbill.com/service1e2.php
websites/bestelectricbill.com/service2.php
websites/bestelectricbill.com/service3.php
websites/bestelectricbill.com/services.php
websites/bestelectricbill.com/shoppingcart.php
websites/bestelectricbill.com/sitemap.php
websites/bestelectricbill.com/story1.php
websites/bestelectricbill.com/story2.php
websites/bestelectricbill.com/story3.php
websites/bestelectricbill.com/termsofuse.php
websites/bestelectricbill.com/Templates/
websites/bestelectricbill.com/Templates/siteassist_config.cfg
websites/bestelectricbill.com/Templates/siteassist_template.dwt.php
websites/bestelectricbill.com/Templates/_notes/
websites/bestelectricbill.com/Templates/_notes/dwsync.xml
websites/bestelectricbill.com/_notes/
websites/bestelectricbill.com/_notes/dwsync.xml
websites/bestelectricbill.com/images/
websites/bestelectricbill.com/images/.DS_Store
websites/bestelectricbill.com/images/app_img17.jpg
websites/bestelectricbill.com/images/bestelectriclogo.jpg
websites/bestelectricbill.com/images/bestelectriclogo.jpg.ori.jpg
websites/bestelectricbill.com/images/btn_saveBusiness.jpg
websites/bestelectricbill.com/images/btn_saveHome.jpg
websites/bestelectricbill.com/images/imgAbout_OverviewTeam copy.jpg
websites/bestelectricbill.com/images/imgCollage.jpg
websites/bestelectricbill.com/images/imgComp1.jpg
websites/bestelectricbill.com/images/imgComp3.jpg
websites/bestelectricbill.com/images/imgComp4.jpg
websites/bestelectricbill.com/images/imgComp5.jpg
websites/bestelectricbill.com/images/imgComp6.jpg
websites/bestelectricbill.com/images/imgComp7.jpg
websites/bestelectricbill.com/images/imgComp8.jpg
websites/bestelectricbill.com/images/phone number.jpg
websites/bestelectricbill.com/images/phone number2.jpg
websites/bestelectricbill.com/images/_notes/
websites/bestelectricbill.com/images/_notes/dwsync.xml
websites/bestelectricbill.com/siteassist_css/
websites/bestelectricbill.com/siteassist_css/color.css
websites/bestelectricbill.com/siteassistcss/mystyles.css
websites/bestelectricbill.com/siteassist_css/navigation.css
websites/bestelectricbill.com/siteassistcss/navigationcolor.css
websites/bestelectricbill.com/siteassist_css/style.css
websites/bestelectricbill.com/siteassist_css/template.css
websites/bestelectricbill.com/siteassistcss/notes/
websites/bestelectricbill.com/siteassistcss/notes/dwsync.xml
websites/bestelectricbill.com/siteassist_images/
websites/bestelectricbill.com/siteassistimages/above_topnavbackground.jpg
websites/bestelectricbill.com/siteassistimages/below_topnavbackground.jpg
websites/bestelectricbill.com/siteassist_images/border.gif
websites/bestelectricbill.com/siteassistimages/bottombackground.jpg
websites/bestelectricbill.com/siteassistimages/brcorner.jpg
websites/bestelectricbill.com/siteassist_images/bubbles.jpg
websites/bestelectricbill.com/siteassistimages/dottedhorizontal.jpg
websites/bestelectricbill.com/siteassistimages/dottedvertical.jpg
websites/bestelectricbill.com/siteassistimages/home_mainbackground.jpg
websites/bestelectricbill.com/siteassistimages/img100x125.gif
websites/bestelectricbill.com/siteassistimages/img160x110.gif
websites/bestelectricbill.com/siteassistimages/img400x197.gif
websites/bestelectricbill.com/siteassistimages/img463x170.gif
websites/bestelectricbill.com/siteassistimages/loginbtn.gif
websites/bestelectricbill.com/siteassistimages/logotraditional.jpg
websites/bestelectricbill.com/siteassistimages/mainfeature.jpg
websites/bestelectricbill.com/siteassistimages/side_navcell.gif
websites/bestelectricbill.com/siteassistimages/side_nav_cellsel.gif
websites/bestelectricbill.com/siteassistimages/side_nav_opengrad.gif
websites/bestelectricbill.com/siteassistimages/side_nav_open_selgrad.gif
websites/bestelectricbill.com/siteassistimages/sidenavbackground.jpg
websites/bestelectricbill.com/siteassist_images/spacer.gif
websites/bestelectricbill.com/siteassistimages/topbackground.jpg
websites/bestelectricbill.com/siteassistimages/topnavbackground.jpg
websites/bestelectricbill.com/siteassistimages/topnav_cellbg.gif
websites/bestelectricbill.com/siteassistimages/topnav_cell_bghover.gif
websites/bestelectricbill.com/siteassistimages/trcorner.jpg
websites/bestelectricbill.com/siteassistimages/notes/
websites/bestelectricbill.com/siteassistimages/notes/dwsync.xml
Number of files: 146
Number of files transferred: 135
Total file size: 1150921 bytes
Total transferred file size: 1150921 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 2825
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 3717
Total bytes received: 896
sent 3717 bytes received 896 bytes 9226.00 bytes/sec
total size is 1150921 speedup is 249.50
Simply copy and and paste output text in terminal to a text file.
What I actually did there was use the "dry run option" (-n) - no files were actually transferred.
For more info on the rsync command type and run "man rsync" at the terminal command line.
Also see this webpage:
http://www.ss64.com/osx/rsync.html
Kj -
Query SQL and output to text file then loop through list to execute
It seems there's no obvious way to do what I want to below as everyone has their own take on querying SQL server with Powershell!
I need to use PowerShell to connect to ServerA and query a test database and select Name from it. The Name results of that query need to output to C:\names.txt and then I need a ForEach loop to go through that file line by line and execute some text
against each Name from the list.
Any ideas how I can achieve this?
Thanks!I can't even output SQl to a table at the moment, the text file has a column header and about 50 empty rows in the file.
$dataSource = "DEMO"
$database = "TESTDB"
$connectionString = "Server=$dataSource;uid=$user; pwd=$pwd;Database=$database;Integrated Security=True;"
$query = "SELECT name FROM dbo.names"
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
$connection.Open()
$command = $connection.CreateCommand()
$command.CommandText = $query
$result = $command.ExecuteReader()
$table = new-object "System.Data.DataTable"
$table.Load($result)
$format = @{Expression={$_.Id};Label="Name";width=25}
$table | format-table $format | Out-File C:\export\servers.txt
$connection.Close() -
How to compare the contents of two different tables
hello. can somebody give me an idean on how to compare the contents of two different tables in mysql?
example, i have a table named Main List and a table named New List.
The contents of the New List should be compared to the contents of the
Main List, to check if they are equal. I don't have any idea how to manipulate
this data. Hoping for your help. Thanks.it is better to comapre it using java.. try get the resultset first and store that in collections then comapre the two collections
-
How to handle the contents of a carousel
Hi,all
Now I have a trouble in how to handle the contents of a carousel.
I use codes below:
locator=(PMTElementaryStream es).getDvbLocator();
serviceDomain.attach(locator);
dsmccObject=new DSMCCObject(serviceDomain.getMountPoint().toString());
file=new File(serviceDomain.getMountPoint().toString());
content= file.list();
to get some file or directories, such as *.png, *.class, *.mpg, xml, MHPdataloader, sport, and so on.
How can I do for next procedure.
Thank you.What do you want to do next? You can create a DSMCCObject that refers to one of the files in your carousel, and use this to control the loading and caching of that file. To actually read a file, however, you will need to create a FileInputStream or RandomAccessFile that refers to that file. You can then use this like any other file access.
This may help you:
// create a new ServiceDomain object to represent
// the carousel we will use
ServiceDomain carousel = new ServiceDomain();
// now create a Locator that refers to the service
// that contains our carousel
org.davic.net.Locator locator;
locator = new org.davic.net.Locator
("dvb://123.456.789");
// finally, attach the carousel to the ServiceDomain
// object (i.e. mount it) so that we can actually
// access the carousel. In this case, we don't specify
// the stream containing the carousel in the locator, so
// we pass in the carousel ID as part of the attach
// request
carousel.attach(locator, 1);
// we have to create our DSMCCObject with an absolute
// path name, which means we need to get the mount point
// for the service domain
DSMCCObject dsmccObj;
dsmccObj = new DSMCCObject(carousel.getMountPoint(),
"graphics/image1.jpg");
// now we create a FileInputStream instance to access
// our DSM-CC object. Alternatively, we could create
// a RandomAccessFile instance if we wanted random
// instead of sequential access to the file.
FileInputStream inputStream;
inputStream = new FileInputStream(dsmccObj);
// we can now use the FileInputStream just like any
// other FileInputStream -
How to read the content in one node of XML in Java? Pls help
My dear brothers,
I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
1. Create a GUI form which gives the ability for user to choose a XML file (ok)
2. Load XML and return the file (ok)
3. Read the file from node to node to create the node in Tree View (?!)
Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
Hoang Yen BinhI hope this one helps you.
<ABC Type="ProductBased" ProdName="One" Location="India">
<CEO>Raj</CEO>
<Finance>Vikram</Finance>
<HR>Karthik</HR>
<Technical>Satish</Technical>
</ABC>
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Attr;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.DOMException;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import java.io.File;
import java.io.IOException;
public class XmlReading {
Document doc;
Element element;
public static void main(String[] args) throws Exception{
XmlReading xr = new XmlReading();
xr.getXmlParser(args);
public void getXmlParser(String[] args) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if(args.length != 1) {
System.err.println("Argument Required");
try {
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(new File(args[0]));
}catch(ParserConfigurationException e1) {
}catch(SAXException e2) {
}catch(IOException e3) {
getAttributes();
public void getAttributes() {
// Retrive the entire Document from the Dom Tree
element = doc.getDocumentElement();
// System.out.println(element);
NamedNodeMap attrs = element.getAttributes();
// Get number of attributes in the element
int numAttrs = attrs.getLength();
// Process each attribute
for (int i=0; i<numAttrs; i++) {
Node node = attrs.item(i);
// Get attribute name and value
String attrName = node.getNodeName();
String attrValue = node.getNodeValue();
System.out.println(attrName + ": " + attrValue);
String s1 = element.getTagName();
System.out.println(s1);
// To get all the elements in a DOM Tree
NodeList nl1 = element.getElementsByTagName("*");
int i2 = nl1.getLength();
System.out.println(i2);
for(int i=0; i<i2; i++) {
System.out.println(nl1.item(i) + "\n");
} -
How to read the contents of attached files
Hi,
I am designing a Form using LiveCycle Designer 8.0
Scenario:
User can attach the file through "Attachments" facility provided on Adobe Reader.
The requirement is to attach 3 documents and post it to SAP system using Web services.
I am using the following code(which i got from this forum only) to find the number of files user has attached.
d = event.target.dataObjects;
n = d.length;
xfa.host.messageBox("Number of Attachments: "+n);
//Displaying the names of the Attached files
for( i = 0; i < n; i++ )
xfa.host.messageBox("Name of the file: "+d[i].name);
My problem: is how to read the contents of the attached files so that I post it to SAP using Web services
Thanks in advance!!
Taha AhmedIn order to read the content of the Redo Log files, you should use Logminer Utility
Please refer to the documentation for more information:
[Using LogMiner to Analyze Redo Log Files|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#SUTIL019]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
I have iTunes on an old pc and am thinking of buying a MacBook Air. I am wondering how to get the content of my iPad on to the Mac as I know that sync only happens in one direction, from pc to device. I assume therefore that when I attach my pad to the new Mac it will sync to an empty iTunes and I will have lost all the content of my pad. I know I can restore purchases, but what about contacts, calendar, photos and music not purchased from apple. I have a fairly recent backup on a pen drive but it is a usb2 device and is formatted for a pc. Any advice would be appreciated.
Do I copy my media library or from a backup. I have a backup on my pc and on an external drive. This drive is usb2 and formatted for windows so I can't connect it to a MacBook Air to make the transfer. Equally I don't think there is a way to connect the 2 computers via a cable ie usb2 one end and usb3 the other. Will the computers talk to each other via wifi if I enable home share although I think this is only for music which still leaves contacts, mail etc.
I am sorry to be such an ignoramus but any further help would be appreciated. -
I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.If the HTTP header contains Content-Length,am getting the content length as below:
public class HTTPResponseReader extends HTTPMessageReader
String statusCode;
public HTTPResponseReader(InputStream istream) throws IOException, NoSuchElementException
BufferedInputStream distream = new BufferedInputStream(istream);
retrieveHeader(distream);
StringTokenizer st = new StringTokenizer(new String(HTTPMessageReader.toArray(header)));
versionProtocol = st.nextToken();
statusCode = st.nextToken();
String s;
while (st.hasMoreTokens())
s = st.nextToken();
if (s.equals("Transfer-Encoding:"))
transferEncoding = new String(st.nextToken());
if (s.equals("Content-Length:"))
contentLength = Integer.parseInt(st.nextToken());
if (s.equals("Connection:"))
connection = new String(st.nextToken());
if (connection.equals("keep-alive")) mustCloseConnection = false;
retrieveBody(distream);
}After getting the Content-Length,i used read method to read the content upto that content length.Then i concatenated the HTTP header and body and the requested site was opened.But some sites dont have Content-Length.Instead of that,Transfer-Encoding is used.I got the HTTP Response header as "Transfer-Encoding:chunked" for some sites.If this encoding is used how to get the length of the message body and how to read the content.
Can anybody help me.
Thanks in advance...
Message was edited by:
VeeraLakshmiWhy don't you use HttpUrlConnection class to retrieve data from HTTP server? This class already supports chunked encoding...
If you want to do anything by yourself then you need to read HTTP RFC and find all required information. Well in two words you may reject advanced encoding by specifying HTTP 1.0 in your request or download chunked answer manually. Read RFC anyway :) -
How to read the content of a blob col along with other cols as pipe delimit
Hi,
I would like to read the blob content along with the other columns . Assume table TAB1 has columns Response_log, Empcode and Ename. Here Response_log col is a blob data type, and the content of the blob is an xml file.Now i would like to read the content of the xml file of response_log column along with Empcode and Ename as pipe delimited . or else the best option would be to write to a text file with name extract.txt with the data being pipe delimited .
create table tab1(
response_log blob,
empcode number,
ename varchar2(50 byte)
)Sample code goes something like the one below .
select xmltype( response_log, nls_charset_id( 'char_cs' ) ).getclobval() || '|' || empcode || '|' || ename
from tab1 Can I have any other alternate way for this.
Please adviceJust Now one example is given in HOW TO WRITE ,SAVE A FILE IN BLOB COLUMN
Maybe you are looking for
-
Since I updated both my apple products to Io6 I'm not able to do any face time over wifi with my family in india from the UK. My family in india had io5 in their iPad 2 and it was working perfectly fine until the io6 was installed . Can you please l
-
Best way to get color / picture in FCE
I'm looking for something to help me get the best picture quality in FCE. I've looked at Colorista and others, but they're all for FCPro. Tony
-
I had to uninstall adobe reader 8.3 for windows vista
How can I reinstall an adobe reader to my laptop? I had to uninstall my 8.3 version because my reader got hacked and stopped working.
-
If I click on Soundtrack Pro > Preferences, only one option appears in the pop-up window: 'Video Out'. Same result when typing 'Cmd-,'. This is a new install of STP 3.01. Any idea what I'm doing wrong?
-
Dropdown at selection screen field
Hi folks, I know how to create drop down enabled field at selection screen but my problem is how to provide the input fie name or unix file name to this list.. file type will be DAT please help me out thanks in advance. Edited by: KARTIKEY SINGH on N