How to display the file name & status when copying files.

I write a program to backup/copy data from one directory to other directory, and I'm using File List and Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
to copy the files, so it will copy the file one by one, and everytime one file is copied, I want to display the result to the screen, but guess what has happened, the screen just display a blank screen, and wait until all the copying processes finish, then it will display all files that has been copied.
Appreciate your expertise to check my coding below.
String[] fileList = fbackupSource.list();
boolean done=true;
JTextArea backupText = new JTextArea();
JScrollPane backupScroll = new JScrollPane(backupText,
ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
JFrame backupWindow = new JFrame("Backup Data");
backupWindow.setBounds(320,240,400,330);
backupWindow.getContentPane().add(backupScroll);          
backupText.setText("Copy files from "+backupSource.toUpperCase()+" to "+backupDest.toUpperCase()+" : \n\n");
backupWindow.show();
for (int i=0; i < fileList.length; i++) {                     
backupText.append(" ("+ i +")... processing " + fileList);
done = copyFile(fileList[i],backupSource,backupDest);
if (done=true) {
backupText.append(" -> done. \n");
else {
backupText.append(" -> fail! \n");
boolean copyFile(String name, String dir1, String dir2) {
try {
java.lang.Process proc =
Runtime.getRuntime().exec("xcopy "+dir1+"\\"+name+" "+dir2+" /y");
proc.waitFor();
return true;
catch (IOException e) {
return false;
catch (InterruptedException e) {
return false;

Oops, sorry, I should have written "Process.getInputStream()". Here's an example from:
http://javafaq.nu/tips/opsys/index.shtml
==============
How can I pass a string to the command line(DOS) ? Also i want to capture the output given by the command line in a string.
Answer: Try this out:
// works for DOS
String cmds[] = new String[2];
cmds[0] = "dir"; // replace with "ls" on UNIX
cmds[1] = "c:"; // replace with "/" on UNIX
// execute the command
Process pro = Runtime.getRuntime().exec(cmds);
// wait until it's done executing
pro.waitFor();
// what did the process output from the Input pipe back to
// this process (okay, who named this stuff)?
InputStream out = pro.getInputStream();
// output it (really slowly)
int i;
while ((i = out.read()) != -1) System.out.println((char) i);==============
Although I don't think this example will do exactly what you want... you might have to delete the waitFor() call and just check to see when there's nothing else to read from the InputStream. It's a start, though, and the web page has a lot of similar examples of this sort of thing.
Yours,
Tom

Similar Messages

  • How to find the dsn name from an *.rpd file provided?

    How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.

    Hi
    DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
    Thanks
    Siddhartha P

  • How to display the device name during file sending with Bluetooth

    I get this Message:
    File Receive Conformation
    Do you want to receive a file from 00:13:70:69:95:84?
    My Question is how can it display the device name not the device address?
    Message was edited by: hazzaa

    The same situation when I want to send photo from mobile phone to my notebook. I didnt find any option how to change it.
    When I send photo from notebook to the mobile phone the notebook name (device name) is displayed. Try to check external device properties. Maybe you will find there way to change it.

  • How to display the current name when renaming Finder item

    Is there any way to get Automator to display the current name of a Finder item when renaming an item?
    I want my users to be able to copy and rename a folder template but I want to display the folder template's current name as a default in the renaming dialogue window, so the user follows the correct naming format.

    Since you've already hacked into it, if you've got developer tools installed, it is most likely in the nib file that is in the English project folder in the Resources.
    I don't know what further implications that will have on the app in general, though.
    If you are a little adept at applescript, you may want to create your own Applescript Studio app to do this instead of Automator. Also, take a look at Platypus to make a wrapper around you applescript instead of AS Studio.
    Message was edited by: Barney-15E

  • How to display the source code for this friggin' file.

    Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
    -"Will code for foo."
    package org.opencyc.webserver;
    * Class WebServer is simple multithreaded HTTP server
    * with CGI limited to a Cyc connection on default port 3600.
    * <p>
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.jar.*;
    import java.text.*;
    import org.opencyc.util.*;
    public class WebServer extends Thread {
         * Singleton WebServer instance.
        public static WebServer current;
         * Default HTTP port.
        protected static int DEFAULT_PORT = 80;
         * Default Cyc base port.
        protected static int DEFAULT_CYC_PORT = 3600;
         * Default directory to serve files from on non-Windows OS.
        protected static String DEFAULT_DIR = "/";
         * Default directory to serve files from on Windows.
        //protected static String DEFAULT_WIN_DIR = "C:\\";
        protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
         * File cache capacity.
        protected static final int CACHE_CAPACITY = 100;
         * File cache to improve file serving performance.
        protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
         * Number of files served from this web server.
        protected static long nbrFilesServed = 0;
         * Number of files served from this web server that were found in the cache.
        protected static long nbrCacheHits = 0;
         * Server socket for accepting connections.
        protected ServerSocket server;
         * Directories to serve files from.
        protected ArrayList dirs;
         * Map from String (jar root) to JarFile[] (jar class path).
        protected HashMap map;
         * Webserver HTTP port.
        protected int port;
         * Cyc HTML host.
        protected String cycHost = "localhost";
         * Cyc HTML port.
        protected int cycPort;
         * Expand jar tress.
        protected boolean trees;
         * Requests flag.
        protected boolean traceRequests;
         * Constructs a WebServer object.
         * @param port the port to use
         * @param directories the directory to serve files from
         * @param trees true if files within jar files should be served up
         * @param traceRequests true if client's request text should be logged.
         * @exception IOException if the listening socket cannot be opened, or problem opening jar files.
        public WebServer() throws IOException {
            getProperties();
            server = new ServerSocket(port);
            processDirectories();
         * Class Task processes a single HTTP request.
        protected class Task extends Thread {
             * Socket for the incoming request.
            protected Socket sock;
             * Client socket to the Cyc KB HTML server.
            protected Socket cycHtmlSocket;
             * Output tcp stream.
            protected DataOutputStream out;
             * Contains the file request path for a not-found error message.
            protected String notFoundPath;
             * Contains the first line of a request message.
            protected String methodLine;
             * Contains the body of a POST method.
            protected String bodyLine;
             * Constructs a Task object.
             * @param sock the socket assigned for this request.
            public Task(Socket sock) {
                this.sock = sock;
             * Processes the HTTP request.
            public void run() {
                if (traceRequests)
                    Log.current.println("connection accepted from " + sock.getInetAddress());
                notFoundPath = "";
                try {
                    out = new DataOutputStream(sock.getOutputStream());
                    try {
                        getBytes();
                    catch (Exception e) {
                        Log.current.println("file not found: " + notFoundPath);
                        try {
                            out.writeBytes("HTTP/1.1 404 Not Found\r\n");
                            out.writeBytes("Server: Cyc WebServer\r\n");
                            out.writeBytes("Connection: close\r\n");
                            out.writeBytes("Content-Type: text/html\r\n\r\n");
                            out.writeBytes("<HTML><HEAD>\n");
                            out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
                            out.writeBytes("</HEAD><BODY>\n");
                            out.writeBytes("<H1>404 - Not Found</H1>\n");
                            out.writeBytes("</BODY></HTML>");
                            out.flush();
                        catch (SocketException se) {
                catch (Exception e) {
                    Log.current.printStackTrace(e);
                finally {
                    try {
                        sock.close();
                    catch (IOException e) {
             * Reads the HTTP request and obtains the response.
             * @exception IOException when HTTP request has an invalid format.
            private void getBytes() throws IOException {
                // Below logic is complex because web browsers do not close the
                // socket after sending the request, so must parse message to find
                // the end.
                BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                ArrayList inBytes = new ArrayList(200);
                int ch = 0;
                boolean postMethod;
                methodLine = in.readLine();
                //if (traceRequests)
                //    Log.current.println("methodLine=" + methodLine);
                bodyLine = "";
                if (methodLine.startsWith("POST /"))
                    postMethod = true;
                else
                    postMethod = false;
                //if (traceRequests)
                //    Log.current.println("postMethod=" + postMethod);
                int ch1 = -1;
                int ch2 = -1;
                int ch3 = -1;
                int ch4 = -1;
                // Read the HTTP request headers.
                while (true) {
                    ch = in.read();
                    inBytes.add(new Integer(ch));
                    ch1 = ch2;
                    ch2 = ch3;
                    ch3 = ch4;
                    ch4 = ch;
                    if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
                        break;
                    if ((! postMethod) &&
                        (! in.ready()) &&
                        ch1 == -1 &&
                        ch2 == -1 &&
                        ch3 == '\r' &&
                        ch4 == '\n') {
                        inBytes.add(new Integer('\r'));
                        inBytes.add(new Integer('\n'));
                        break;
                byte[] byteArray = new byte[inBytes.size()];
                for (int i = 0; i < inBytes.size(); i++) {
                    Integer ich = (Integer) inBytes.get(i);
                    byteArray[i] = ich.byteValue();
                String headers = new String(byteArray);
                if (postMethod) {
                    String lcHeaders = headers.toLowerCase();
                    int i = lcHeaders.indexOf("content-length: ");
                    String contentLength = lcHeaders.substring(i + 16);
                    int j = contentLength.indexOf("\r\n");
                    contentLength = contentLength.substring(0, j);
                    int bodyLen = (new Integer(contentLength)).intValue();
                    for (int k = 0; k < bodyLen; k++) {
                        bodyLine = bodyLine + (new Character((char) in.read())).toString();
                String line = methodLine + "\r\n" + headers + bodyLine;
                if (traceRequests)
                    Log.current.println(line);
                if (postMethod)
                    processHttpPost();
                else
                    if (line.startsWith("GET /"))
                        processHttpGet(line.substring(4));
                    else {
                        Log.current.println("Invalid request = " + line);
                        throw new IOException();
             * Processes an HTTP GET method.
             * @param httpGetPath the path of the file to get.
             * @exception IOException if the file is not found.
            private void processHttpGet(String httpGetPath) throws IOException {
                int i = httpGetPath.indexOf(' ');
                if (i > 0)
                    httpGetPath = httpGetPath.substring(0, i);
                Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
                i = httpGetPath.indexOf("cg?");
                if (i > 0) {
                    cycHtmlRequest(httpGetPath.substring(i + 3));
                    return;
                notFoundPath = httpGetPath;
                i = httpGetPath.indexOf('/');
                if (i < 0 || map == null) {
                    if (map == null || httpGetPath.endsWith(".jar")) {
                        for (int j = 0; j < dirs.size(); j++) {
                            String dir = (String) dirs.get(j);
                            String nativePath = dir + httpGetPath;
                            nativePath = nativePath.replace('/', File.separatorChar);
                            if (fileCache.containsKey(nativePath)) {
                                writeDataBytes((byte[]) fileCache.get(nativePath));
                                Log.current.println("...cached");
                                nbrCacheHits++;
                                nbrFilesServed++;
                                return;
                            try {
                                File f = new File(nativePath);
                                byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
                                writeDataBytes(fileBytes);
                                if (fileCache.size() >= CACHE_CAPACITY)
                                    fileCache.clear();
                                fileCache.put(nativePath, fileBytes);
                                Log.current.println("...from " + nativePath);
                                nbrFilesServed++;
                                return;
                            catch (IOException e) {
                    throw new IOException();
                String jar = httpGetPath.substring(0, i);
                httpGetPath = httpGetPath.substring(i + 1);
                JarFile[] jfs = (JarFile[]) map.get(jar);
                if (jfs == null)
                    throw new IOException();
                for (i = 0; i < jfs.length; i++) {
                    JarEntry je = jfs.getJarEntry(httpGetPath);
    if (je == null)
    continue;
    writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
    nbrFilesServed++;
    return;
    throw new IOException();
    * Processes an HTTP POST method.
    * @exception IOException if the file is not found.
    private void processHttpPost() throws IOException {
    Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
    cycHtmlRequest(bodyLine);
    * Reads the specified number of bytes and always close the stream.
    * @param in the file to be read for subsequent downloading.
    * @param length the number of bytes to read from the file.
    * @return An array of bytes from the file.
    * @exception IOException if an error occurs when processing the file.
    private byte[] getBytes(InputStream in, long length) throws IOException {
    DataInputStream din = new DataInputStream(in);
    byte[] bytes = new byte[ (int) length];
    try {
    din.readFully(bytes);
    finally {
    din.close();
    return bytes;
    * Sends the HTML request to Cyc.
    * @param cycPath the portion of the URL which is given to the Cyc HTML server.
    private void cycHtmlRequest(String cycPath) {
    String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
    System.out.println("request=" + request);
    ArrayList bytes = new ArrayList(10000);
    try {
    cycHtmlSocket = new Socket(cycHost, cycPort);
    System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
    BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
    PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
    cycOut.println(request);
    cycOut.flush();
    int ch = 0;
    while (ch >= 0) {
    ch = cycIn.read();
    bytes.add(new Integer(ch));
    catch (Exception e) {
    Log.current.printStackTrace(e);
    byte[] byteArray = new byte[bytes.size()];
    for (int i = 0; i < bytes.size() - 1; i++) {
    Integer ich = (Integer) bytes.get(i);
    byteArray[i] = ich.byteValue();
    try {
    writeTextBytes(byteArray);
    catch (Exception e) {
    Log.current.println(e.getMessage());
    * Responds to the HTTP client with data content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeDataBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    String prefix = (new String(bytes)).toLowerCase();
    if (prefix.indexOf("<html>") > -1)
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    else
    out.writeBytes("Content-Type: application/java\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Respond to the HTTP client with text content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeTextBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Gets properties governing the web server's behavior.
    private void getProperties() {
    port = DEFAULT_PORT;
    String portProperty = System.getProperty("org.opencyc.webserver.port", "");
    if (! portProperty.equalsIgnoreCase(""))
    port = (new Integer(portProperty)).intValue();
    Log.current.println("Listening on port " + port);
    cycPort = DEFAULT_CYC_PORT;
    String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
    if (! cycPortProperty.equalsIgnoreCase(""))
    cycPort = (new Integer(cycPortProperty)).intValue();
    Log.current.println("Cyc connections directed to port " + cycPort);
    String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
    dirs = new ArrayList(3);
    StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
    while (st.hasMoreTokens()) {
    String dir = st.nextToken();
    dirs.add(dir);
    trees = false;
    String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
    if (! treesProperty.equalsIgnoreCase(""))
    trees = true;
    traceRequests = false;
    String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
    if (! traceRequestsProperty.equalsIgnoreCase("")) {
    traceRequests = true;
    Log.current.println("tracing requests");
    * Adds transitive Class-Path jars to jfs.
    * @param jar the jar file
    * @param jfs the list of jar files to serve.
    * @param dir the jar file directory.
    * @exception IOException if an I/O error has occurred with the jar file.
    private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
    Log.current.println("Serving jar files from: " + dir + jar);
    JarFile jf = new JarFile(dir + jar);
    jfs.add(jf);
    Manifest man = jf.getManifest();
    if (man == null)
    return;
    Attributes attrs = man.getMainAttributes();
    if (attrs == null)
    return;
    String val = attrs.getValue(Attributes.Name.CLASS_PATH);
    if (val == null)
    return;
    dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
    StringTokenizer st = new StringTokenizer(val);
    while (st.hasMoreTokens()) {
    addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
    * Administrative accessor method that obtains list of directories from which files are served.
    public ArrayList getDirs() {
    return dirs;
    * Administrative method that updates the list of directories from which files are served.
    public synchronized void setDirs(ArrayList dirs) throws IOException {
    this.dirs = dirs;
    fileCache.clear();
    processDirectories();
    * Administrative accessor method that obtains number of files served.
    * @return The number of files served.
    public long getNbrFilesServed() {
    return nbrFilesServed;
    * Administrative accessor method that obtains number of files served from cache.
    * @return The number of files served from the cache.
    public long getNbrCacheHits() {
    return nbrCacheHits;
    * Administrative method that clears the file cache.
    public synchronized void clearFileCache() {
    Log.current.println("Clearing file cache");
    fileCache.clear();
    nbrFilesServed = 0;
    nbrCacheHits = 0;
    * Processes the directories from which files are served, expanding jar trees if
    * directed.
    * @exception IOException if problem occurs while processing the jar files.
    private void processDirectories() throws IOException {
    if (dirs.size() == 0)
    if (File.separatorChar == '\\')
    dirs.add(DEFAULT_WIN_DIR);
    else
    dirs.add(DEFAULT_DIR);
    Iterator directories = dirs.iterator();
    while (directories.hasNext())
    Log.current.println("Serving from " + directories.next());
    if (trees) {
    map = new HashMap();
    for (int j = 0; j < dirs.size(); j++) {
    String dir = (String) dirs.get(j);
    String[] files = new File(dir).list();
    for (int i = 0; i < files.length; i++) {
    String jar = files[i];
    if (!jar.endsWith(".jar"))
    continue;
    ArrayList jfs = new ArrayList(1);
    addJar(jar, jfs, dir);
    map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
    * Provides the command line interface for creating an HTTP server.
    * The properties are:
    * <pre>
    * org.opencyc.webserver.port=<HTTP listening port>
    * </pre>
    * which defaults to 80.
    * <pre>
    * org.opencyc.webserver.cycPort=<Cyc connection port>
    * </pre>
    * which defaults to 3600.
    * <pre>
    * org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
    * </pre>
    * with the argument enclosed in quotes if any path contains an
    * embedded space.
    * The default directory on Windows is C:
    * and the default on other systems is / the default
    * can be overridden with this property. By default, all files
    * under this directory (including all subdirectories) are served
    * up via HTTP. If the pathname of a file is <var>path</var> relative
    * to the top-level directory, then the file can be downloaded using
    * the URL
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>path</var>
    * </pre>
    * Caching of file contents is performed.
    * <pre>
    * org.opencyc.util.log=all
    * </pre>
    * If the all value is given, then all attempts to download files
    * are output.
    * <pre>
    * org.opencyc.webserver.traceRequests
    * </pre>
    * If this property has any value, then the client HTTP requests are
    * output.<p>
    * <pre>
    * org.opencyc.webserver.trees
    * </pre>
    * This property can be used to serve up individual files stored
    * within jar files in addition to the files that are served up by
    * default. If the property has any value, the server finds all jar files
    * in the top-level directory (not in subdirectories). For each
    * jar file, if the name of the jar file is <var>name</var>.jar, then any
    * individual file named <var>file</var> within that jar file (or within
    * the jar or zip files referenced transitively in the Class-Path manifest
    * attribute, can be downloaded using a URL of the form:
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
    * </pre>
    * When this property has any value, an open file descriptor and cached
    * information are held for each jar file, for the life of the process.
    * @param args an unused array of command line arguments.
    public static void main(String[] args) {
    Log.makeLog();
    System.out.println("OpenCyc Web Server");
    try {
    // Launch thread to accept HTTP connections.
    current = new WebServer();
    current.start();
    catch (IOException e) {
    e.printStackTrace();
    * Just keep looping, spawning a new thread for each incoming request.
    public void run() {
    try {
    while (true) {
    // Launch thread to process one HTTP request.
    new Task(server.accept()).start();
    catch (IOException e) {
    e.printStackTrace();

    JLundan,
    I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
    Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
    Further, where would I put the "foo.html" file so it can be written to?
    FileOuputStream fos = new FileOutputStream("foo.html");
    fos.write(bytes);
    fos.close();
    Thanks so much for your help. I look forward to your response, at your convenience.
    Regards

  • Data Modeler / Logical Model / How to display the "relationship name" ?

    Hi,
    Oracle SQL Developper Data Modeler 2.0.0 (build 584):
    I would like to know if there is a way to display the "relationship name" in the diagram for the logical model in the GUI interface and/or to print it?
    I checked in the different setup tool options and I did not find it...
    Thanks for your help.
    Regards,
    Robin Ouellet

    Hi Robin,
    you cannot "show" relationship name on logical diagram - you can show "name on source" and "name on target" properties. You can set them at cardinality page of relationship dialog, And make them visible in "Tools>General options>Diagram>Logical model" settings - it's "Show Source/Target Name" option.
    For printing - you can use "File>Print Diagram" to print in different format. Also "File>Print" allow diagram to be printed to printer, plotter or PDF printer if you have one installed.
    Philip

  • How to display the Get info window for a file or folder

    Hello,
    How can I display the Get Info window for a file or folder using Applescript - instead of selecting it in the finder and using Command-I ?
    Thanks.
    lenpartico

    The item property that the Get Info was opened for is read only, so it doesn't look like you can just throw a file path at it. You could do something like telling the Finder to reveal the item, then keystroke the command, e.g.:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Finder"
    reveal "Path:to:your:file"
    activate
    end tell
    tell application "System Events" to keystroke "i" using {command down}
    </pre>
    ... but this doesn't seem to be much different than the regular method. There are other methods to get various information, what are you wanting to do?
    Edit:
    Hmmm, I could have sworn (I do a lot of that these days) I tried Hiroto's method, but that does work. It still seems to be a roundabout way of doing something though.
    Message was edited by: red_menace

  • How to display the folder name in a webi report at infoview

    Hi all,
    Suppose I have a report named "Test_Report" at location Public folder > Test_Folder> Reports_Folder
    now I want to display the folder name "Test_Folder" using a variable in "Test_Report".
    So that the variable will always display the corresponding folder name of "Test_Report" wherever the report resides.
    Thanks in advance.

    Folder name is located in the breadcrumb
    remove your breadcrumb in your collectionrenderer of the layout set you are using.
    Check the layout set you are using in your KM navigational iview.
    Raghu

  • How to display the column names of a table in the output

    Hi,
    I want to display the name of the columns of the table without using literals in a abap report.
    EX: Consider the table KNA1
    KUNNR NAME  ADDRESS
    I want to display the column names in the above fashion without using hardcoded write statements.
    Thanking in anticipation

    You can use this FM <b>DDIF_FIELDINFO_GET</b> It gives you all the names related to fields in a table -:)
    Greetings,
    Blag.

  • How to display the User Name in Transaction MM04's output

    Hi Experts,
    My requirement is that in the Transaction MM04's output, along with all the fields displayed, I also want the User Name to be displayed.
    Here User Name must be the Person's Name and not the ID of the Person.
    Is there a way by which I can achieve it?
    Useful answers will definitely be rewarded.
    Thanks in advance.
    Regards,
    Himanshu

    Hi,
    Thanks a lot for your quick replies.
    But my requirement is to integrate the User Name Field with the MM04's output.
    So, I need either an Exit or any other way by which I can display the User Name in the Standard Transaction MM04's output.
    Regards,
    Himanshu

  • How to display the Full Name in Masthead of the Portal

    Where exactly in the HeaderiView.jsp I need to edit to be able to display the full name in the Masthead of the portal.
    e.g.
    Welcome Paul Jones

    Hi Paul,
    Following customized code displays Full Names on my portal:
    private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
        IUserContext userContext = request.getUser();
        if (userContext != null)
              String firstName = userContext.getFirstName();
              String lastName = userContext.getLastName();
              String displayName = userContext.getDisplayName();
              String salutation = userContext.getSalutation();
              if (displayName != null)
                   if(salutation != null)
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {displayName, salutation, " "}).toString();
                   else
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {displayName, " ", " "}).toString();
              else if ((firstName != null) && (lastName != null))
                   if(salutation != null)
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
                   else
                        return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
              else
                   return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getUniqueName()," ", " "}).toString();          
        return "";
    Regards,
    Sergei

  • Data Modeler How to display the "relationship name" vertically

    Is there any way to display the relationship name vertically. In Designer, it used to be like that.

    there is no such option.
    Philip

  • How to display the field name in the tabulated view for a content query web part

    I have added a content query web part changed the web part file to include custom columns imported and reffered itemstyle.xsl
    to include the tabulated view for the content query.
    However the way it is displayed is such that only the content is displayed.
    As i am using a tabular view wto display the data, i want to display their field names as well.

    Hi  ,
    According to your description, my understanding is that you need to display the field in the tabulated view for a content query web part.
    For your issue, please refer to the code as below:
    <xsl:template name="VendorCustomStyle" match="Row[@Style='VendorCustomStyle']" mode="itemstyle">
    <html>
    <table width="100%">
    <xsl:if test="count(preceding-sibling::*)=0">
    <tr>
    <td width="8%" valign="top"><div class="item"><b>Vendor ID</b></div></td>
    <td width="12%" valign="top"><div class="item"><b>Vendor Name</b></div></td>
    <td width="50%" valign="top"><div class="item"><b>Vendor Description</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Vendor Country</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Vendor Date</b></div></td>
    <td width="10%" valign="top"><div class="item"><b>Created By</b></div></td>
    </tr>
    </xsl:if>
    <tr>
    <td width="8%" valign="top"><div class="item"><xsl:value-of select="@VendorID" /></div></td>
    <td width="12%" valign="top"><div class="item"><xsl:value-of select="@Title" /></div></td>
    <td width="50%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Description" disable-output-escaping="yes" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Country" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Date" /></div></td>
    <td width="10%" valign="top"><div class="item"><xsl:value-of select="@Author" /></div></td>
    </tr>
    </table>
    </html>
    </xsl:template>
    For more information, please have a look at the blog:
    http://www.codeproject.com/Articles/756834/Customizing-the-Content-Query-Web-Part-and-Item-St
    http://msdn.microsoft.com/en-us/library/ms497457.aspx
    http://clarksteveb.hubpages.com/hub/Customized-Content-Query-Web-Part-CQWP-in-SharePoint-2007-with-results-Tabbed-Grouped-and-in-an-HTML-Table
    http://blog.sharepointexperience.com/customitemstyle/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to display the responsibility name in the header of a SS page?

    Customer is wanting to show the Responsibility name at the top of the Self Service page, similar to the way the PUI forms does.
    For example, if you are in Forms and have the System Administrator responsibility opened, in the top of the forms window you will see: System Administrator
    The customer has several iProcurement responsibilities
    “KNAW Internet Procurement 210”
    “KNAW Internet Procurement 220”
    “KNAW Internet Procurement 230”
    “KNAW Internet Procurement 240”
    “KNAW Internet Procurement 250”
    and would like to see the which responsibility they are in displayed at the top of the SS/OAF page.
    They are on R12.1.2, and I have looked through the Framework Profile Options but not finding anything there.
    Is there a way to do this?
    Thanks,
    Randy
    my ref.3-3132851721

    hi,
    is there any generic fix for this. if we want to display then we need to change the each page CO . is it a possible solution. or any generic solution. Please provide
    Thanks
    Smarak

  • How to display the Customer Name in the Sales invoice form

    Hi All!
    May I know the table from which I select the customer name for a certain customer number?
    Thanks in advance!

    Hi,
    Kna1 is the customer master table there you can find the name1 filed
    Thanks,
    NN.

Maybe you are looking for

  • After installing Adobe Flash Player Plugin to view videos on youtube, mozilla gets hangs intermittently. Please help

    I installed Firefox 23.0.1 and after that It asked me to install Flash Player Plugin to view videos on Youtbe. I installed Flash Player 11 Plugin and since then Mozilla started hanging/freezing intermittently. It hangs on those websites also where vi

  • Major Bug FaceTime in iOS 7 with 2 devices

    I have 2 iPhone 5 devices one is work one is my personal one, each has its own phone number and its own Apple ID (Not Shared Between The 2) in iOS 7 now whenever someone facetimes me because the 2 numbers come under the same contact card both phones

  • Organisational data determination in order in webshop

    hi all, we have a requirement when we create  a sales order in web shop the org data determined based on the sold to party. but  the data should be determined based on the channel partner. sales area should be same as per the sold to party but sales

  • Data movement from R/3 DB to APO DB and to Live cache

    Dear APO Experts, I have few questions on live cache and how it works, I understand that Live cache is memory resident database. below are my questions. 1) What sought of data move from R/3 DB to APO DB and then to Live cache DB 2) When data moves fr

  • Convert pdf to word or excel.

    I have tried to enter a subscription for 1 yr. @ $1.99/mo., but there is no place to activate it. All there is to click on is "Review-" and when I do that, everything disappears. I have done that twice and now I don't know if I have 2 subscriptions o