Spaces in File path of a command

Hi all,
I have a problem in the following API
Runtime.getRuntime.exec
("open /var/root/Desktop/Test Folder/abc.jpg");
it does not open the file mentioned but the following command
Runtime.getRuntime.exec("open /var/root/Desktop/TestFolder/abc.jpg");
it opens the file abc.jpg. the only difference between these 2 commands is spaces in "Test Folder" directory name.
Please let me know if anybody has an idea.
thanks
Message was edited by:
nav_nini

Also note that to put a quote within a string, you must use:
e.g, this string printed out in cmd...
String text = "\"This is a quote\", he said";
would be: "This is a quote", he saidJust incase you didnt understand that from masijade's explanation.

Similar Messages

  • Spaces in File Path Hyperlink

    I have a crystal report that lists invoices. On each row is an image that contains a hyperlink that loads an image of the scanned invoice. The invoice fields related to that row are passed into the hyperlink. The hyperlink is as follows;
    PVault\Documents\Accounts Payable\Invoices\"&{Invoice.VendorNumber}&"\AP Invoice "&{Invoice.VendorNumber}&" - "&{Invoice.InvoiceNumber}&".tif"
    This hyperlink worked outside of the DNN portal. I have added this report to the portal and am running the report successfully. However when I click on the hyperlink in the DNN portal the hyperlink fails with cannot find file path.
    I would appreciate any help with this. Thanks.

    Hi,
    Please have a look at the Rules of Engagement before posting to these forums. The link is here:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement
    Once you have read the above, please provide the necessary information.
    VS version?
    CR Version?
    Service pack level?
    Production or development issue?
    Sincerely,
    Amit

  • Issue with OracleHelp loading HelpSet with space in file path

    Hi,
    I'm running into an issue where I cannot get OracleHelp to load a HelpSet correctly with RoboHelp contains when the file is in a directory with a file space in it.
    This will load successfully if the path does not contain any white spaces. It looks like oraclehelp may be running into an issue decoding the %20. Any thoughts?
    java.io.FileNotFoundException: C:\temp\qa_relea%20se\windows\data\help\oracl
    e_help_files\HelpTOC.xml (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at oracle.help.engine.DataEngine._getBufferedReader(Unknown Source)
    at oracle.help.engine.XMLTOCEngine.createDataObject(Unknown Source)
    at oracle.help.common.View.getViewData(Unknown Source)
    at oracle.help.common.navigator.tocNavigator.TOCUtils.getTopicTree(Unkno
    wn Source)
    at oracle.help.common.navigator.tocNavigator.MergingTopicTreeNode._creat
    eTopicTreeNodes(Unknown Source)
    at oracle.help.common.navigator.tocNavigator.MergingTopicTreeNode._reall
    yAddView(Unknown Source)
    at oracle.help.common.navigator.tocNavigator.MergingTopicTreeNode.addVie
    w(Unknown Source)
    at oracle.help.navigator.tocNavigator.TOCNavigator.addView(Unknown Sourc
    e)
    at oracle.help.Help._createNavigatorForView(Unknown Source)
    at oracle.help.Help._createNavigatorsForBook(Unknown Source)
    at oracle.help.Help.addBook(Unknown Source)

    Hi Experts,
    My concern was Say I delete the requests from the day the data was loaded with thw wrong update rule, I have the data sitting in the PSA and I can reconstruct them. I understand that the data can be corrected in ODS.
    But in the cube, some key figures are there with the update method as 'addition'. So say I delete the content of the cube and reload it from the ODS all over again, wont the key figures get corruipted yet again?
    Also as I was thinking, say we delete the respective request from the cube as well, and reconstruct the data in the ODS. can I fire the delta request again to capture the changed records to be loaded to cube. to be exact will all the data from the date of the data corruption(as I am going to delete the requests from the cube from that day also) will be loaded to the cube?
    Also another thing is will it be a better idea to reconstruct a request in the ODS and run the delta package for the cube.. And go on ..
    Kindly suggest..
    Thanks in advance !!!

  • Spaces in file path preventing image load

    Hi all,
    I've got a problem: after installing Java 1.4 on Windows 2000, some of my image loading code stopped working--but only under very specific conditions (the code in question follows the post).
    If you run an applet locally, AND the applet is accessing the class files in an archive (a ZIP file, in my case), AND the path to the html file that references the applet contains spaces, the Java plug-in can't find any images (using the default Toolkit's 'getImage' method).
    For example, if I launch "c:/projects/slide_test/slide.htm", everything works great, but if I launch "c:/projects/slide test/slide.htm", the images won't load (assuming the .class files exist in an archive in both cases).
    Similarly, if I launch "c:/projects/slide test/slide.htm" but leave the .class files unzipped and in the "slide test" directory, everything works fine.
    The code works great using the Microsoft JVM and worked well under JRE 1.3_0x.
    Has anyone else encountered and/or solved this problem?
    Thanks in advance for any help or comments.
    Here's the image loading code, though I stress it's been working great up to Java 1.4:
    try {
        this.image = Toolkit.getDefaultToolkit().getImage(imageURL);
        try {
            tracker = new MediaTracker(parentApplet);
            tracker.addImage(this.image, 0);
            try {
                tracker.waitForID(0);
                this.iWidth = this.image.getWidth(null);
                this.iHeight = this.image.getHeight(null);
            catch (Exception e) {
                System.out.print("Failed to track image.\n");
        catch (Exception e) {
            System.out.print("applet not yet initialized.\n");
    catch(Exception e) {
        System.out.print("Failed to data for bitmap " + imageURL.toString() + "\n");

    Hey Safir,
    Thanks for the post. Unfortunately, that didn't fix the problem. I tried reforming the URL using "\ " and " " (in place of the '%20' that Java automatically substitutes), but the problem persists.
    Given that the code works as is until you try to access the class files from an archive, I think there's something deeper at work.
    Thanks again.
    Kreitler

  • File path from find command and using POSIX

    Hi,
    I have a find command in do shell script returning output files of the form ./xyz/abc/.../...
    instead of the full path.
    I am guessing that this is the problem when I use POSIX path of one of those files. Can Applescript understand the "./" or does it need a full Unix path to convert it back?
    In that case, how do I ask find command to return the full path?
    Thanks in advance!

    >I am guessing that this is the problem when I use POSIX path of one of those files. Can Applescript understand the "./" or does it need a full Unix path to convert it back?
    You're right - AppleScript won't be able to use those paths because AppleScript has no idea of the current directory used by the shell.
    The problem is that you're defining '.' a the start point of your search.
    For each matching file find will print this start point in front of the relative path, assuming that you know where you're starting from. So the solution is to provide that path as the search start point rather than .
    For example, if your current script says:
    <pre class=command>cd /some/directory
    find . -name "*.mp3"</pre>
    You could/should rewrite this as:
    <pre class=command>find /some/directory -name "*.mp3"</pre>
    in the second case all matches would include the full path including the /some/directory part.
    If you can't predict what your search directory will be you can write your find like this:
    <pre class=command>find `pwd` -name "*.mp3"</pre>
    which will fill in the current directory (via pwd at the time the search is executed and will output full paths that AppleScript can work with.

  • Create table space command with no specification of data file path.

    I am using following command for creating table space in oracle 11g
    CREATE TABLESPACE testTbSpace DATAFILE 'dataFileName.dbf' SIZE 50M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE 32767M NOLOGGING"
    But it is creating datafile dataFileName.dbf at disk at following path
    echo $ORACLE_HOME/dbs
    I dont want to create datafile at this path and also dont want to specify data file path in 'create table space' command.
    Is there is any parameter,which i can set and above command start to create dataFileName.dbf at that path
    Edited by: user8680179 on May 15, 2012 1:54 AM

    user8680179 wrote:
    i issued following commands from 'SYS' user;
    1. show parameter db_create_file_dest;
    NAME TYPE VALUE
    db_create_file_dest string
    2.alter system set db_create_file_dest='dataFilePath';
    System altered.
    3.show parameter db_create_file_dest;
    NAME TYPE VALUE
    db_create_file_dest string dataFilePath
    4.CREATE TABLESPACE testTbSpace2 DATAFILE 'test1.dbf' SIZE 50M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE 32767M NOLOGGING;
    Tablespace created.
    But still my test1.dbf file is creating at old path($ORACLE_HOME/dbs)Is datafilepath a real location? I don't think so! Give a proper path like "d:\oracle\" and retry.
    Aman....

  • How to handle spaces in using path to the file

    Hi Friends,
    I am getting error "file not found" if I give path of the file that contains spaces in it. (eg. C:\Users\Sample Project\file.txt)
    If I give path that doesn't contain spaces (eg. C:\Users\Sample\file.txt) then it works fine without any error.
    Basically I am invoking one command at runtime (using "exec") in my java program that excepts path of the file as one parameter.
    I can't remove space by manipulating path - othewise that path will be different.
    How can I solve this issue?
    Thanks

    Works for me:
    import java.io.*;
    public class ProcessExample {
        public static void main(String[] args) throws IOException {
            if (args.length == 0) {
                Runtime r = Runtime.getRuntime();
                dump(r.exec("java ProcessExample foo \"bar baz\""));
            } else {
                for(String s : args) {
                    System.out.println(s);
        static void dump(Process p) throws IOException {
            BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
            for(String s; (s = r.readLine()) != null; ) {
                System.out.println("[" + s + "]");
    }But ejp's advice is even better.

  • Problem launching Firefox from Windows with file path that contains space characters in the html file's file name

    We have a software application that programmatically launches the default web browser using the Windows shell execute function ("ShellExecuteA" in the "shell32.dll" library of the Windows API) along with a file path for a saved local html file that is to be displayed. In the case that FireFox is the default browser and the file path for the html file contains any space characters in the html file's file name, Firefox (in this case v7.01) will display an error message "File not Found..." and then will also proceed to open tabs for each of the individual words in the file name, launching as the URL path, each individual word appended to ".com".
    In the following example, the path "C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm" when launched programmatically, resulted in the error message "File not Found...Firefox can't find the file at /C:/KSSecOfState/Forms/Kansas." and opened up browser windows for "http://www.secretary.com/", "http://www.of.com/", "http://www.state.com/", "http://www.and.com/", and attempted to launch "http://forms.htm". If the same file (renamed) is launched using the path string "C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm" the file opens up correctly in Firefox. Clearly the presence of spaces in the file name is causing the problem.
    I should also note that either path (with or without space characters) works properly if pasted directly into the Firefox URL path menu bar for a live instance of Firefox. The test path strings I used were:
    C:\KSSecOfState\Forms\KansasSecretaryOfState-FilingsAndForms.htm
    C:\KSSecOfState\Forms\Kansas Secretary of State - Filings and Forms.htm
    Does anyone know anything about this problem or how to work around it (other than the obvious answer of taking the spaces out of the file name which is not possible for this application). It seems the problem is specific to Firefox. IE works properly if launched programmatically with spaces in the file name passed to it. I haven't tested other browsers yet.
    Thanks!

    If starting from ShellExecute works the same as starting from the command line then there are two options:<br>
    Put everything inside double quotes<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''"c:\test\svg test.htm"'''<br>
    Convert to a valid url with file:// protocol and percentage-escaping the space<br>
    '''C:\Program Files\Mozilla Firefox\>'''firefox.exe '''file://c:\test\svg%20test.htm'''<br>

  • Bug: can't access static files with space in the path

    Please let me know if this a a wrong place to file bug reports.
    I installed webserver7u4 and when I try to access a static file within my war which contains a space in the path, I get HTTP404.
    $ ls webserver7/https-myapp/web-app/myapp/_default/images/ddtree/black\ spinner/1.png
    webserver7/https-myapp/web-app/myapp/_default/images/ddtree/black spinner/1.png
    $ wget -O /dev/null "http://localhost:8080/images/ddtree/black spinner/1.png
    "--13:47:06-- http://localhost:8080/images/ddtree/black%20spinner/1.png
    => `/dev/null'
    Resolving localhost... 127.0.0.1, ::1
    Connecting to localhost|127.0.0.1|:8080... connected.
    HTTP request sent, awaiting response... 404 Not found
    13:47:06 ERROR 404: Not found.Now, if I create a symlink to a path that contains url encoded space, everything works:
    $ ls -l webserver7/https-myapp/web-app/myapp/_default/images/ddtree/black%20spinner
    lrwxrwxrwx 1 root root 13 Aug 1 2008 webserver7/https-myapp/web-app/myapp/_default/images/ddtree/black%20spinner -> black spinner
    $ wget -O /dev/null "http://localhost:8080/images/ddtree/black spinner/1.png"
    --13:49:37-- http://localhost:8080/images/ddtree/black%20spinner/1.png
    => `/dev/null'
    Resolving localhost... 127.0.0.1, ::1
    Connecting to localhost|127.0.0.1|:8080... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1,446 (1.4K) [image/png]
    100%[======================================================================== =======================================>] 1,446 --.--K/s
    13:49:37 (89.76 MB/s) - `/dev/null' saved [1446/1446]So to me it appears that webserver doesn't decode the path before searching the local file system, which to me looks like a bug.
    Let me know if you need more info.
    cheers,
    Igor

    HTTP/1.1 RFC [http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2|http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2]
    3.2 Uniform Resource Identifiers
    URIs have been known by many names: WWW addresses, Universal Document Identifiers,
    Universal Resource Identifiers [3], and finally the combination of
    Uniform Resource Locators (URL) [4] and Names (URN)  ... where
    3 is a link to [http://www.ietf.org/rfc/rfc1630.txt|http://www.ietf.org/rfc/rfc1630.txt] section BNF for specific URL schemes
      httpaddress              h t t p :   / / hostport [  / path ] [ ?search ]
      path                   void |  segment  [  / path ]
      segment                xpalphas
      xpalphas               xpalpha [ xpalphas ]
      xpalpha                xalpha | +
      xalpha                 alpha | digit | safe | extra | escape
      alpha                  a | b | c | d | e | f | g | h | i | j | k |
                             l | m | n | o  | p | q | r | s | t | u | v |
                             w | x | y | z | A | B | C  | D | E | F | G |
                             H | I | J | K | L | M | N | O | P |  Q | R |
                             S | T | U | V | W | X | Y | Z
      digit                  0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
      safe                   $ | - | _ | @ | . | &  | + | -
      extra                  ! | * |  " |  ' | ( | )  | ,
      escape                 % hex hex
      hex                    digit | a | b | c | d | e | f | A | B | C | D | E | F{code}
    4 is a link to RFC 1738 Uniform Resource Locators (URL)
    [http://www.ietf.org/rfc/rfc1738.txt|http://www.ietf.org/rfc/rfc1738.txt] section 5. BNF for specific URL schemes
    has :
    {code}
    httpurl        = "http://" hostport [ "/" hpath [ "?" search ]]
    hpath          = hsegment *[ "/" hsegment ]
    hsegment       = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
    uchar          = unreserved | escape
    escape         = "%" hex hex
    hex            = digit | "A" | "B" | "C" | "D" | "E" | "F" |
                                 "a" | "b" | "c" | "d" | "e" | "f"
    unreserved     = alpha | digit | safe | extra
    alpha          = lowalpha | hialpha
    lowalpha       = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
                     "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
                     "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
                     "y" | "z"
    hialpha        = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
                     "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
                     "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
    digit          = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |"8" | "9"
    safe           = "$" | "-" | "_" | "." | "+"
    extra          = "!" | "*" | "'" | "(" | ")" | ","
    {code}
    I do not see space in these RFCs for httpurl.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Dynamic OS Command file path

    In the OS Command process type of a process chain, is there a way to change the file path depending on the system? In Prod the path should be different from the path in Dev. Right now, I have to manually edit it in each system. Can this be automated? Thanks.

    Uday,
    The paths depend on the file systems mounted.
    the filesystems mounted will be on a single logical partition / tablespace in most cases and should not chang on system refresh.
    A system refresh would be from PRD to DEV which would mean that the chains in DEV would have to be changed.
    This will have to happen if you are using SM69/Process chain OS command.
    You could however try something like this :
    Option 1  :
    Have both the paths in your script / batch file. then try reading the file .. whichever is readable wuld mean that the file is avail;able and can be loaded and then use the one for which the file exists.
    Option 2:
    Detect the system using a program in SE38 and then execute the script internally in the program using the SXPG_COMMAND_EXECUTE...
    Arun

  • Copy full file path+file name in Midnight Commander

    Hi!
    How can I copy a file's full path with the file name in Midnight Commander?
    If I press Ctrl+Alt+Enter it's shows this to me in the command line but I can't copy this route.
    If I mark a file with 'Insert' and than if I would like to paste this for example in Mousepad or any other text editor with Shift+Insert or Ctrl+V it isn't works.
    (Relatively newbie sitting here so if the answer is complicated please write a step-by-step instruction )

    Well,I did a lot of research on the internet and I found the best solution.
    - choose the file,press 'Ctrl' + 'Shift' + 'Enter'
    - after that you can see the full file path + the file name in the command line (bottom of the screen)
    - Select the text with 'Shift' + 'Mouse Left Click' (drag it across the whole command)
    - For copy the text, press 'Ctrl' + 'Insert'
    - For paste, press 'Shift' + 'Insert'
    This is still pretty damn slow,I wanted to do it with a single key combination while the file is selected but it looks impossible.
    But at the same time I have started to use Ranger file manager which is also runs from terminal,extremely fast,easy to use and if I press 'Ctrl' + 'Insert' on a file it is copies the full path with the name of the file itself. Just perfect.
    I won't mark the thread [SOLVED] because if anybody knows a better method for this in Midnight Commander (with a script or whatnot) maybe will write it down for us. I hope...

  • How do I set the default file path for the Place command?

    I keep my graphics files for each document in a particular folder. Every time I open an existing InDesign document and place a new image I have to browse back to that location - even though all of the previous images in that document came from the same folder. InDesign does not remember the file path that was used previously in the document. This is very annoying.
    IS THERE A WAY TO SET THE DEFAULT FILE PATH, OR LOCATION, FOR IMAGE FILES?
    I have looked through the preferences, searched the forums and internet, but I have not found any reference to setting default paths. Is there a setting like the one in MS Word called "File Locations" on the Options toolbox?
    Thank you.

    Since you're working in ID on Windows, you can take advantage of a neat trick in Windows. Copy the file path out of the File Explorer address bar and paste it directly into the Place filename field. That will jump you directly to the desired volume. For example, let's say I want to place a graphic located at X:\PS Jobs\May PS\709672bp\Working Source Files\Links. I copy that entire path from the File Explorer address bar, go to InDesign, select File|Place, and press Control + V to paste that path into the filename field. I press the Open button and Shazam! I'm there instantly, without a bunch of navigation.
    You can do the same thing in the File|Save As and File|Export fields. Let's say you want export a PDF file from InDesign to the volume X:\PS Jobs\May PS\709672bp\Working PDF Files. First copy the desired file path from the File Explorer window. In InDesign, select File|Export, click anywhere in the filename field, and press the Home key to move the insertion point to the front of the filename. Press Control + V to paste that path in front of the filename, then add the backslash character (\). The filename will now look like this: X:\PS Jobs\May PS\709672bp\Working PDF Files\Filename.pdf. Press the Save button to bring up the Export Adobe PDF window. Select your desired PDF preset, press the Export button, and the PDF file will magically appear in the desired volume.
    This sounds really complicated, but it's not. In practice, it only takes a few seconds. I probably save an hour's worth of needless navigation every day with this technique.

  • File Path adds %20 where there are spaces

    Hi Everyone;
    I'm trying to track down a problem.
    The file path for Program Files folder in the old version of my app presents C:\Program Files\Folder in the DOS console. And the app works.
    However, the new version of the app displays the paths in the DOS console like this C:\Program%20Files\Folder
    And I get path not found errors.
    One of the difference between the 2 apps is the first is using java 1.3.1.02 the second is using jvm 1.4
    Does anyone know if 1.4 will do cause this change to happen ?
    stev

    I have found that the problem was with the java version.
    I switched from jre 1.4.1 to java 1.3.1 and the problem is resolved
    I however, have not pinpointed exactly where in the code causes this different behavior. but if anyone sees something like this in the future, you might want to double check the different behavior between 1.3 and 1.4.
    it could be a simple method etc = i haven't looked in the code to identify the exact problem however, cause this is a 3rd party java app.

  • Consolidate Library, Not enough Space, itl files, genuius, external drive,

    In the interest of putting something back, thought I would post this
    Objective
    To have a single iTunes Library, on a Server PC, (Windows Home Server) so that if a change is made while on PC (a) or PC (b) we see the change.
    Setup
    PC (a) living room
    PC (b) kitchen
    Windows home server, on 24 x 7
    In doing this I made a number of errors, and hope you learn from this, and also found a couple of 'features' that made life harder.
    Standard approach
    1) in iTune preferences, alter the position where you want to store your data, so this could be
    //Server/Music/iTunes/Alison/Library
    You need the subdirectory as the Library is where your itunes will reside, and your internal itunes file one directory up.
    This process will change pointers in te internal itunes files, but still references the music in the various locations it is stored.
    2) Now go to the File Menu/ Library / Consolidate Library
    This will move all your music to teh location you specified above.
    At this point I ran into my first problem, despite having adequate space on the Windows Home Server (WHS) I would get the error 'not enough space to copy files'
    I believe the reason I was getting this error message was that some of the files paths were over 256 chat in length. There is also a limitation in WHS on this, but I believe the issue in this case was with iTunes, not WHS.
    To get around this issue, I changed the location of where I was going to consolidate all the files to, to an internal disk on the PC where my itunes library was. so Instead of;
    //Server/Music/iTunes/Alison/Library
    I used m:/iTunes/Alison/Library
    This worked, so I had all my data (now duplicated effectively, but consolidated) on the same PC.
    The reason people say use consolidate is that it makes the move easy and changes all the internal files, but as I couldn't consolidate to the location I required due to the error, I now have to move all the rest of the data manually.
    3) Copy the Library file on the local PC drive to the WHS Library Directory;
    Copy m:/iTunes/Alison/Library => //Server/Music/iTunes/Alison/Library
    4) I then edited the internal itunes files, so that it pointed to the WHS server location. I edited the itunes internal file;
    Settings\Alison\My Documents\My Music\iTunes\iTunes Music Library.xml
    I did this in notepad, with a find and replace command,
    Find 'm:/'
    Replace '/Server/Music/
    The above bit does require some thought and if you have made it this far, have a look at the xml file structure, and you will be able to figure out how to alter the path.
    This has the effect of pointing the iTunes file at where the music is now stored, you can confirm this by starting iTunes and getting it to show the track it is playing in Explorer. If it is pointing at your new location you are good to go.
    Remember I only had to do this, as I was unable to consolidate to the location I really wanted to go to, due to the space error.
    Also note that I had 2gb memory on the machine I did the find and replace on, as Notepad is not memory friendly.
    5) Apple has some other internal files that need to be corrected as well;
    iTunes Library.itl
    iTunes Library Genius.itdb (if running genius)
    iTunes Library Extras.itdb (believe is genius related)
    sentinel (no idea, but saw this file !)
    To get these all corrected to the new WHS (or external drive) I created a iTunes Library.itl file with zero bytes in the directory Settings\Alison\My Documents\My Music\iTunes\, did this in notepad. I then started iTunes, and it created all of the above files with the new file locations. You can't edit the above files, apple encrypts them
    6) you now move all of the corrected internal files to the WHS home server location;
    //Server/Music/iTunes/Alison
    iTunes Library.itl
    iTunes Music Library.xml
    iTunes Library Genius.itdb
    iTunes Library Extras.itdb
    sentinel
    7) Now you repoint the itunes to the new location for the internal files, specifically the correct itunes library, there are a number of references on the net to do this that you press the shift key(PC) or the option key (Mac)
    I am running a PC, and pressing the shift key while clicking on the itunes icon on the desktop does not work. You have to hold the shift key while starting itunes from the Start Menu, Programs, Itunes. This will then give you an option of which library to look at, and look at the library on the WHS drive (or external drive)
    Thats it
    Hope this helps someone who has to battle with iTunes like I did. Due to the variosu errors, size of the library (200gb) and other issues, whole process took 2 days, if doing this again would have taken a couple of hours.
    DGW

    Hiya, that's sweet to post what you went through!
    I have a question, though - are you able to have both PCs running itunes at the same time?
    When I try this, I get an error message that the ITL file is locked on the 2nd instance I try to open. I'm using an exHD, not a server.
    Also - all that editng of the XML file doesn't save ratings, date added, and some other metadata. If you'd just moved the ITL file, that metadata would be intact.

  • Save sheet as a .prn, or a space delimited file

    I need to be able to save my numbers file as a prn file, which I also believe to be a space delimited file. Does anyone know how i can do this?
    Thanks in advance!!!!

    I hate to apply different formatting tasks when the machine may do the job for me.
    Here is a dedicated AppleScript :
    --[SCRIPT columnsBySpaces]
    Enregistrer le script en tant que Script : columnsBySpaces.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Dans la ligne d'en-têtes la plus haute, indiquer les largeurs de colonnes (en nombre caractères)
    En l'absence de valeurs numérique, le script utilisera une largeur de 12 caractères.
    Sélectionner les cellules à exporter
    menu Scripts > Numbers > columnsBySpaces
    Un fichier nommé "columnsBySpaces_aaaammjj-hhmmss.txt" sera créé sur le bureau.
    Vous pourrez l'imprimer en utilisant une police de chasse constante.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    --=====
    Save the script as a Script: columnsBySpaces.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    In the higher header row, enter the wanted widths of columns (characters numbers).
    If there is no numerical value, the script use 12 characters by column.
    menu Scripts > Numbers > columnsBySpaces
    A file named "columnsBySpaces_aaaammjj-hhmmss.txt" will be created on the Desktop.
    You will be able to print it using a monospaced font.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    Save this script as a … Script in the "Folder Actions Scripts" folder
    <startupVolume>:Library:Scripts:Folder Action Scripts:
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2010/04/29
    --=====
    on run
    set |largeurParDéfaut| to 12
    my activateGUIscripting()
    set {dName, sName, tName, rName, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    set lesLargeurs to {}
    tell row 1
    repeat with c from colNum1 to colNum2
    try
    set largeur to (value of cell c) as integer
    if largeur = 0 then set largeur to |largeurParDéfaut|
    on error
    set largeur to |largeurParDéfaut|
    end try
    copy largeur to end of lesLargeurs
    end repeat
    end tell -- row 1
    set lesLignes to {}
    repeat with r from rowNum1 to rowNum2
    tell row r
    set uneLigne to {}
    repeat with c from colNum1 to colNum2
    set maybe to (value of cell c) as text
    set largeur to item c of lesLargeurs
    if (count of maybe) < largeur then
    repeat until (count of maybe) = largeur
    set maybe to maybe & space
    end repeat -- until…
    end if
    copy maybe to end of uneLigne
    end repeat -- c
    copy my recolle(uneLigne, "") to end of lesLignes
    end tell
    end repeat -- r
    set lesLignes to my recolle(lesLignes, return)
    end tell
    set nomDuRapport to "columnsBySpaces" & (do shell script "date " & quote & "+_%Y%m%d-%H%M%S" & quote) & ".txt"
    set p2d to path to desktop
    set p2r to (p2d as Unicode text) & nomDuRapport
    tell application "System Events"
    if exists (file p2r) then delete (file p2r)
    make new file at end of p2d with properties {name:nomDuRapport}
    end tell
    write lesLignes to (p2r as alias)
    end run
    --=====
    set { dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    on getSelParams()
    local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
    set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
    if r_Name is missing value then
    if my parleAnglais() then
    error "No selected cells"
    else
    error "Il n'y a pas de cellule sélectionnée !"
    end if
    end if
    set two_Names to my decoupe(r_Name, ":")
    set {row_Num1, col_Num1} to my decipher(item 1 of two_Names, d_Name, s_Name, t_Name)
    if item 2 of two_Names = item 1 of two_Names then
    set {row_Num2, col_Num2} to {row_Num1, col_Num1}
    else
    set {row_Num2, col_Num2} to my decipher(item 2 of two_Names, d_Name, s_Name, t_Name)
    end if
    return {d_Name, s_Name, t_Name, r_Name, row_Num1, col_Num1, row_Num2, col_Num2}
    end getSelParams
    --=====
    set {rowNumber, columnNumber} to my decipher(cellRef,docName,sheetName,tableName)
    apply to named row or named column !
    on decipher(n, d, s, t)
    tell application "Numbers" to tell document d to tell sheet s to tell table t to return {address of row of cell n, address of column of cell n}
    end decipher
    --=====
    set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errMsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    return {theDoc, theSheet, theTable, theRange}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on parleAnglais()
    local z
    try
    tell application "Numbers" to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on recolle(l, d)
    local t
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end recolle
    --=====
    replaces every occurences of d1 by d2 in the text t
    on remplace(t, d1, d2)
    local l
    set AppleScript's text item delimiters to d1
    set l to text items of t
    set AppleScript's text item delimiters to d2
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end remplace
    --=====
    removes every occurences of d in text t
    on supprime(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return (l as text)
    end supprime
    --=====
    on activateGUIscripting()
    tell application "System Events"
    if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
    end tell
    end activateGUIscripting
    --=====
    ==== Uses GUIscripting ====
    This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
    It may be used to 'type' keyboard shortcuts if the third parameter describe the required modifier keys.
    on shortcut(a, t, d)
    local k
    tell application a to activate
    tell application "System Events" to tell application process a
    set frontmost to true
    try
    t * 1
    if d is "" then
    key code t
    else if d is "c" then
    key code t using {command down}
    else if d is "a" then
    key code t using {option down}
    else if d is "k" then
    key code t using {control down}
    else if d is "s" then
    key code t using {shift down}
    else if d is in {"ac", "ca"} then
    key code t using {command down, option down}
    else if d is in {"as", "sa"} then
    key code t using {shift down, option down}
    else if d is in {"sc", "cs"} then
    key code t using {command down, shift down}
    else if d is in {"kc", "ck"} then
    key code t using {command down, control down}
    else if d is in {"ks", "sk"} then
    key code t using {shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "k" then
    key code t using {command down, shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "a" then
    key code t using {command down, shift down, option down}
    end if
    on error
    repeat with k in t
    if d is "" then
    keystroke (k as text)
    else if d is "c" then
    keystroke (k as text) using {command down}
    else if d is "a" then
    keystroke k using {option down}
    else if d is "k" then
    keystroke (k as text) using {control down}
    else if d is "s" then
    keystroke k using {shift down}
    else if d is in {"ac", "ca"} then
    keystroke (k as text) using {command down, option down}
    else if d is in {"as", "sa"} then
    keystroke (k as text) using {shift down, option down}
    else if d is in {"sc", "cs"} then
    keystroke (k as text) using {command down, shift down}
    else if d is in {"kc", "ck"} then
    keystroke (k as text) using {command down, control down}
    else if d is in {"ks", "sk"} then
    keystroke (k as text) using {shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "k" then
    keystroke (k as text) using {command down, shift down, control down}
    else if (d contains "c") and (d contains "s") and d contains "a" then
    keystroke (k as text) using {command down, shift down, option down}
    end if
    end repeat
    end try
    end tell
    end shortcut
    --=====
    --[/SCRIPT]
    Of course, as I am lazy, I defined only four columns but you may work with more if you wish.
    Yvan KOENIG (VALLAURIS, France) jeudi 29 avril 2010 16:16:05

Maybe you are looking for