Win vs. Mac File Paths

I have a script that Peter Kahrel helped me with (actually he pretty much wrote the whole thing). The script saves out each page of an Indesign doc as jpeg. It also takes the text from a text box tagged "jobnumber" and inserts it into the name of the saved jpeg.
It works great on the Mac. When I move it over to Windows it inserts a weird character before and after the "jobnumber".
On the Mac I can take the folder name which is a variable called 'path' and insert that into the filename as well but it doesn't work on Windows. Does anyone know what the differences are between Mac and Win paths in JS? I tried a few things to no avail.
Here's the script:
==========================================
var path = Folder.selectDialog ("Choose a Folder")
app.jpegExportPreferences.resolution = 72;
app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange;
app.activeDocument.sections.everyItem().includeSectionPrefix = false;
//path = app.activeDocument.filePath + '/';
p = app.activeDocument.pages.everyItem().getElements();
for (i = 0; i < p.length; i++)
jpg_name = p[i].textFrames.item ('jobnumber').contents + '.jpg';
app.jpegExportPreferences.pageString = p[i].name;
app.activeDocument.exportFile (ExportFormat.jpg, File (path + "/" + jpg_name));
===========================================
As always, Thanks a million,
Randy

I forgot, here's a screenshot:
http://reallyrandy.com/misc/screenshot2.jpg

Similar Messages

  • Fileserver problems (Win/Mac): file path broken

    I'm working in a mixed pc/mac environment. Most clients run Windows, some run Mac OS X, but we're all connected to the same Windows file server.
    When I sit at a Mac client and place a picture from the Win server into a ID CS3 document, the path to the photo will look like this (in ID's Link panel):
    PARTITION:Clientfolder:project_folder:photo.tif
    BUT...
    When sitting at a Win client, placing the exact same picture from the same source, the path now look like this:
    \\SERVER\partition\Clientfolder\project_folder\photo.tif
    Note that the "\\SERVER\" part is not in the Mac path.
    This is a problem because whenever we open a document on "the other platform", all links are broken and we must manually re-link them.
    I've tried mounting the partition using both "smb" and "afp" protocols on the Mac, but still get the same result.
    Any clue as to what is going on is greatly appreciated! :)

    >...the Links panel uses platform specific filepaths.
    I think there must be more to it than that. I do not normally work this way, but I just tried it, and I had no problem with the links using this setup:
    Mac - ID CS3 5.0.2 on MacBookPro 10.5.2
    Windows - ID CS3 5.0.2 in Parallels on the same MBP running Vista
    "Server" - Windows 2000 sp4 (client)
    I created a file on the Mac using images residing on the "server" volume which was mounted as SMB. The link information was a Dennis suggests - "\\Server\Share\Directory\file"
    I saved the file, and then opened it under Vista, and there was no complain about the links. Looking at the Link Info, they were also as Dennis described - "Share:Directory:file"
    I'm not sure what accounts for our different results, but I'm happy to do any testing with my set up...

  • File path problems between mac and PC

    hi
    I'm having some issues with file paths, done a lot of searching online, here and on creative cow and no answers to be found (same question asked a few times though).
    I'm working on projects on a MAC and then collecting files (project only) to a watch folder on a PC for rendering.
    Most of the really big files (.R3D) are located locally on the PC but a few files are on a server.
    I can work on them fine on my Mac but when the project comes across to the PC it can find the files located on one of its drives (the same drive as the project source folder) but loses the filepath to the server and to the other internal drive as well.
    I have to open the project on the PC and repoint to the missing footage and then save which is a real pain in the #@$% and kind of defeats the purpose of the distributed rendering.
    how can I set absolute paths for the PCs from my MAC ????
    cheers../daniel

    Hey, sorry Mylenium, but this statement is not true. I was almost convinced to give up after reading this, but I managed to make a working conversion tool shortly after.
    This is the method in After Effects, I am pretty sure that it can work in the rest of the adobe suite as well.
    All you need to do to get the paths to update to windows format is to:
    1. Select "Save as xml" and save an .aepx.
    2. Open the .aepx in text edit.
    3. Perform a find for "/Volumes" and replace with "//<MountPointOnThePC>" (for example I have the drive as a network drive on the pc so I swap the <MountPointOnThePC> to the name of my mac as that is the path on the pc machine)
    4. Perform another find for "MacPOSIX" and replace with "Win"
    5. Save your file and you will be able to open in on a pc with all the files online.
    Disclaimer, I built this to work on my set up using a mac server and a pc render farm for after effects. Please back up your projects before opening them and editing them.
    Hope this helps anyone else trying to do the same.

  • What is the file path in Mac 10.5

    Where does Adobe Media Player store it's files ( video ) in Mac OS 10.5?
    When you play a video over the internet, does Media Player download and store the video automatically?
    I think the app is good, but I do not want 32G of downloaded videos that I can not find and purge.
    Thanks,
    Ed

    But also, a string containing a file path isn't a file object which is what ImportOptions requires. For example:
    var myFile = new File("string showing my file path");
    var myImportOptions = new ImportOptions(myFile);

  • File Path for Saved Mac Mail

    What is the file path in OS X Yosemite to locate my saved "On My Mac" emails from the Mac Mail Application?  I am trying to recover them from Time Machine as I had to reinstall Yosemite due to a software issue.  I tried using the search bar with no luck.  Any help would be greatly appreciated.  Thanks.

    You do not say if you have just media on the external or if it is the whole library.  Wireless drives can be a problem.  If they go to sleep or for some reason are not up and fully awake/mounted when you start iTunes, iTunes will revert back to its default library location on the internal drive.  Switching on the drive after starting iTunes won't get iTunes to have another look for hte drive -- you have to restart iTunes.
    I hope you are not storing your media on the same drive you use for backup.  What will you do when one day the airport drive unexpectedly fails?

  • Invalid File Path Names in Mac OS X

    Hello,
    I am trying to create a Javascript in Mac OS X 10.4.11, however I am having some trouble with what characters are valid in file path names in Mac OS X. Does anybody know where I can get a list of invalid characters that cannot be used in a file name?
    Thanks,
    james

    Any character other than a colon can be used in the name, but additional characters and names may be handled differently if you are interacting with the UNIX shell in the script.
    (30221)

  • Apple/Mac Appending to File path?

    I have the following javascript script runnning in InDesign:
    if (File.fs == "Windows") {
    var defaultPath = new File('\\\\server\\path\\to\\file');
    } else {
    var defaultPath = new File('smb://server/path/to/file');
    The code works fine in Windows (the file is on a Windows shared directory), but on a Mac I get a "cannot find folder" error and claims the defaultPath variable is:
    /Applications/Adobe InDesign CS5/scripts/XHTML For Digital Editions/smb:/server/path/to/file
    I am confused about 2 things:
    Why is it appending "/Applications/Adobe InDesign CS5/scripts/XHTML For Digital Editions/" to the path?
    Why is it changing smb:// to smb:/ (one forward-slash) ?
    Am I using the wrong path for Mac? Is there supposed to be something else before smb:// to identify that it is not a local path?

    John,
    As I stated in my first reply, using /Volumes/ did not work
    I am not sure the path specified is mounted on the system. Is that required and how do you get the mount name? Is it possible to access the path without it being mounted?
    I was also looking here:
    http://support.apple.com/kb/HT2799
    Will /Network/Servers etc work?
    I am not a Mac user so I don't know much about Mac's filesystem or the file paths used. On the test machine I have used just typing in smb://server/path/to/file works in the Finder (Windows Explorer equivalent) but does not work in the code.

  • Files panel - CS4 Win vs Mac

    I'm a Mac user for a long time. Recently, I've done some website work on a PC using CS4. Irritatingly, on the PC, the Files panel [ungrouped] remains ontop of the files when opening them. I have to minimize the panel to see the open files. On Mac this was never a propblem in any version of CS or MX and prior for that matter.
    Is there any way to get the same panel behavior on the PC (XP) as the Mac?
    TIA

    The message you sent requires that you verify that you
    are a real live human being and not a spam source.
    To complete this verification, simply reply to this message and leave
    the subject line intact.
    The headers of the message sent from your address are shown below:
    From [email protected] Thu Sep 30 14:59:49 2010
    Received: from mail.sgaur.hosted.jivesoftware.com (209.46.39.252:46688)
         by srx.websitewelcome.com with esmtp (Exim 4.69)
         (envelope-from <[email protected]>)
         id 1P1PIC-0000Rg-TJ
         for [email protected]; Thu, 30 Sep 2010 14:59:49 -0500
    Received: from sgaurwa41p (unknown 10.137.24.42)
         by mail.sgaur.hosted.jivesoftware.com (Postfix) with ESMTP id 164212408737
         for <[email protected]>; Thu, 30 Sep 2010 13:59:51 -0600 (MDT)
    Date: Thu, 30 Sep 2010 13:59:42 -0600
    From: dbonneville <[email protected]>
    Reply-To: [email protected]
    To: Robert Brownlee <[email protected]>
    Message-ID: <1682816458.4761181285876791099.JavaMail.jive@sgaurwa41p>
    Subject: Files panel - CS4 Win vs Mac
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_483213_1569776918.1285876782647"
    Content-Disposition: inline
    X-Spam-Status: No, score=-1.0
    X-Spam-Score: -9
    X-Spam-Bar: -
    X-Spam-Flag: NO

  • Common URL format for sharing file paths between Mac and Windows?

    Hi -
    I have to integrate several Macs into a Windows environment. We need to be able to copy and paste file paths to share between all machines. Is there a common URL format that can be used between the platforms?
    On Windows, I have:
    \\server\share\file
    On the Mac:
    smb://server/share/file
    Thank you for your help,
    Steve

    On Windows you have what is known as a "UNC".
    On the Mac, you have a "URL". It starts with the protocol to use "smb" then gives the path to the item using standard conventions.
    UNC is Microsoft mainly.
    The only way I know for Windows to use a URL is with an application like a web browser or ftp client.
    On the Mac, you can use UNCs but they must be modified as follows.
    In Terminal:
    smbclient \\\\servername\\sharename\\filename -U username
    And enter a password if prompted.
    Notice that you must double up the slashes. This is due to how UNIX shells treat the backslash.
    You will connect to the share, but it will only be in Terminal.

  • Dreamweaver CS6 - MAC: How do I view / display a file path in code view?

    I work with complex applications / sites that use cross-browser ajax calls and different configurations. We use two different prod servers which flip/flop for active while the other is a backup. I need the ability to see (from a root level) exactly which file I'm looking at. This seems like a no-brainer, but I have had no luck finding anything related to it. Please help.

    The first item in the "Coding Toolbar" (the left hand side of the code window) that looks like a file icon with a little black down arrow will show you the file path.
    I know it's not great for your purpose. It should be visible all the time (perhaps on the bottom of the window that is virtually empty.) You should request this to Adobe.
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Error message: "Can't open file "[File path, file name].key"

    If I attempt to open any Keynote files, I now get this error message.
    "Can't open file "[File path: file name].key"
    To clarify, the text in the square brackets above would be the file path and then the file name.
    The file then will appear on the screen, but is unresponsive to any clicks or menu commands.
    The files will open successfully on other Macs, so they aren't corrupt.
    Also - I've just checked, and opening Keynote and trying to create a new presentation leads to the same problem: All screen menus / buttons are dead - all I can do is drag the window around the screen.
    I've tried to reinstall Keynote, but this hasn't resolved the problem.
    Is there some corrupt preference file (or similar) that I need to get rid of? Is there an easy way to do a complete uninstall of Keynote so I can try another install? Or is this a symptom of something else?
    All ideas gratefully appreciated!
    Message was edited by: Brendan Donlon

    All the issues I describe in my questions around this time re: Keynote were actually symptoms of a soon-to-die laptop. The Hard Disc was corrupting, and Keynote was the first application to be affected.

  • Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path

    Snow Leopard 10.6.2 CS4 InDesign can't open files with a "#" in file path using any of these perfectly normal methods:
    1. double-click file in the Finder (e.g in a Folder on your Mac or on your Mac desktop etc.)
    2. select file and choose "File... Open" command-o in the Finder
    3. drag file to the application icon in the Finder.
    4. Select file in Bridge and double-click, choose File.. Open.. or Drag icon to InDesign icon in dock.
    If you try to open an ID file named with a "#", you will get an error message "Missing required parameter 'from' for event 'open.'"
    This happens to any InDesign file that has a "#" (pound sign, number sign, or hash) in the filename or in the file path (any parent folder).
    To reproduce
    Name an InDesign file Test#.idd Try to open it in the Finder or Bridge (as opposed to the "Open" dilaog of InDeisng itself).
    "Solution"
    The file WILL open using File... Open... command-o while in InDesign application.
    Rename the file or folders that have a "#" (shift-3) in the filename.
    Report to Adobe if it bugs you.
    This does not occur in "plain" Leopard 10.5 nor Tiger 10.4
    Untested in Panther or before and
    Untested with CS3 and earlier in Snow Leaopard.
    Anyone have those and want to try this... ?

    In case this really bothers you: we've added a workaround for this into Soxy. If you enable the option, these documents will open fine on double-click.
    You need Soxy 1.0.7 from:
    http://www.rorohiko.com/soxy
    Go to the 'Soxy' - 'Preferences' - 'Other' dialog window, and enable 'Open InDesign via Script'
    (Irrelevant background info (it's all invisible to the user): the workaround works by special-casing how Soxy opens documents in InDesign: instead of using AppleScript, Soxy will use ExtendScript to instruct InDesign to open the document - which works fine).

  • File path limitation across lan shared storage

    Friends,
    I realize that the mac os does not have a file path limitation and a file name limit of 255 char.
    But, Is there a path length limitation specific to adobe products ( in order to make projects more cross platform ).
    I have adobe InDesign and have projects (files) on a NAS  I am experiencing difficulties with the files on the nas.
    [ crashing the app , running slow ]  I am wondering if having files nested 10 -14 levels deep could be a problem.
    My file path length are about 80 - 200 char.
    the nas is a buffalo terrastation [ xfs ] attached 1000 mbps
    thanks

    Service that run Application Server specifies in Log
    On Tab, Log on as Local System account.
    And when I run the servlet through its url, user.name
    JAVA property is SYSTEM.
    When I log on to the server with Admin user and invoke
    the servlet's doGet method from other java class
    locally, writing is succeeded. user.name JAVA property
    in this case (when I logged on) is Admin.
    Probably I should be logged on to the system before I
    can perform operations with files on the local
    network?So Admin has permission to write to that share but 'Local System' doesn't.
    Option 1 (recommended): Check out jCifs, if you use that you can specify a different user to write to the share from that which the system is running under.
    Option 2: run the service as a user who does have appropriate permissions.
    Option 3: run the application server in the foreground instead of as a service.

  • Save as PDF file path dialog

    Again, another odd operation that Adobe has added to Acrobat Professional DC for Mac. When I Save, or Save As in Acrobat DC, the next window is an Adobe Save As PDF  window with several, helpful options. There is a list of five or so Recently Visited folder, options in the sidebar to send this to a Cloud and a giant button "Choose a Different Folder". This button is so large, I actually, have trouble locating it.
    Usually, I'm working in a current document and the folder I wish to save that document to, percolates to the top of the Recent Folders. That's handy. However, when you click that selection, actually any selection, even Choose a Different Folder, the OS X Finder window always opens up to the same folder. The folder is named, simply "T" for temporary. If you save anything there, and close Acrobat, you have lost your work my friend. I have figured that out, now. But my question is, why ask where my destination folder of choice, if you never locate it anyway? That window is a waste of space.
    This is obviously a bug between the new DC version and the Mac Finder system. The action in the Save As PDF window need to have the file paths updated.

    Hi
    I accessed to a website from my uni library computer using my student account and download a pdf file in there. However, that pdf file contains a line of words saying "Accessed by ... University Library on 30 Mar 2007". This line is printed vertically and on the left side of the page.
    Do you know how to remove that line? I think the website just embedded that line into the file.
    Please help.
    Thank you very much.
    tuanduy

  • How can I get a file path element in XML to work in AI javascript?

    Hi all - this is my first post. I'm pretty familiar with javascript, but I'm new to the Adobe scripting environment.
    Our client wants Illustrator at startup to load a certain pattern swatch. It works fine when I hard code the pattern file path, but it needs to be user configurable, so I put the file path info in an XML file to be read in at startup. The XML file is read in and the elements are extracted into varibles. When I concatenate the variables to create the file path string and try to open the pattern file, it says file not found.
    Here is my source code:
    var fileObj = new File("aiConfig.xml");
    fileObj.open("r:");
    var xmlString = new XML(fileObj.read());
    var driveLetter = xmlString.fullPathName.driveLetter.text();
    var filePath = xmlString.fullPathName.filePath.text();
    var fileName = xmlString.fullPathName.fileName.text();
    var fullFilePath = driveLetter + filePath + fileName;
    var styled_ai = app.open(new File(fullFilePath));
    app.activeDocument = styled_ai;
    Here is aiConfig.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <aiConfig>
      <fullPathName>
         <driveLetter>C:</driveLetter>
         <filePath>/Program Files/Adobe/Adobe Illustrator CS4/Presets/en_US/Swatches/Patterns/Decorative/</filePath>
         <fileName>Decorative_Modern.ai</fileName>
        </fullPathName>
    </aiConfig>
    Any help would be greatly appreciated - this is driving me a little crazy.
    Thanks,
    Tom

    Hi Tomchag,
    Your script works fine on MAC OS X & illustrator CS4.
    i have change only pathway to aiConfig.xml like this:
    var fileObj = new File("/Volumes/LaCie/aiConfig.xml"); //<- path of my external HDD should be D:/ on windows
    and the contents in aiConfig.xml to :
    <?xml version="1.0" encoding="windows-1252" ?>
    <aiConfig>
      <fullPathName>
         <driveLetter></driveLetter>
         <filePath>/Applications/Adobe Illustrator CS4/Presets.localized/fr_FR/Nuancier/</filePath>
         <fileName>VisiBone2.ai</fileName>
        </fullPathName>
    </aiConfig>
    So.. i notice twice thing:
    1) complete file and path for aiConfig.xml
    2) i didn't use drive letter (but it's specific to windows)
    I hope this post can help you
    Cyao, art.chrome

Maybe you are looking for

  • AirPort Extreme 802.11n (4th Generation) no longer recognized by iPhone 4S

    I'm a new community member so please forgive me if this question has been asked and answered and I didn't see it. DirectTV came to troubleshoot a DVR cinema connection device that had been wirelessly connected to my AirPort Extreme without incident s

  • My CS5 won't load - it just "hangs"

    my CS5 won't load - it just "hangs"

  • Port 80

    I was wondering what happens when a client connects to my HttpServlet in terms of what ports are in play? I am using a Tomcat that is set op to listen on port 8080. So the initial HTTPServletRequest must come in on that port, but will subsequest comm

  • Import Windoze OL2000 PST mail into Mac OSx MS Entourage2004 or Osx Mail

    Anyone aware of any Mac based scripts/conversion utilities that will convert within the following caveats/parameters?: * Must run on OSx 10.4.10+ Intel C2D - (Yes I'm aware of Windoze based options to say re-export PST to CSV/Tab delim formats etc as

  • Package com.ms.* + documentation

    Did somebody knows how to use package com.ms.* and where can i have the package documentation ?