Apple/Mac by adding to the file path?

I have the following script javascript in InDesign runnning:

If (File.fs == "Windows") {}

defaultPath var = new File ('\\\server\\path\\to\\file');

} else {}

defaultPath var = new File ("smb://server/path/to/file");

}

The code works correctly in Windows (the file is located on a shared Windows directory), but on a Mac, I get an error "cannot find file" and claims that is the defaultPath variable:

/ Applications/adobe InDesign CS5/scripts/XHTML for Digital Editions/smb: / server/path/to/file

I'm confused about 2 things:

  1. Why is it by adding "/ Applications/Adobe InDesign CS5/scripts/XHTML for Digital Editions / ' path?
  2. Why is he changing smb: / / for smb: / (a slash)?

I use the incorrect path for Mac? Is there supposed to be something else before smb: / / to identify that this is not a local path?

Hi James,

On a mac to access a network as follows volume...

var myTxtFile = File("/volumes/MountedShareName/test.txt");

myTxtFile.open ("w");

myTxtFile.write ("Test\n");

myTxtFile.close ();

Alert ("Done");

This example creates a test file on a mounted network volume...

Hope this helps...

John

Tags: InDesign

Similar Questions

  • IE7 "could not open the file: * path *.» The file exists may not

    I created a package of IE7 a while back which works great.  Apart from this little problem.  It generates an error when the user tries to open a .msg to the WebApp.  It will try to open Outlook and display the following error message.  «Could not open the file: * path *.»  The file exists may not, you don't have permission to open it, or it may be open in another program.  Right click on the folder that contains the file, and then click action to check your permissions for the folder. »

    All the other files attached to work.  PDF, html, txt, rtf, etc.  I tried to move temporary Internet files to a different location with the same result.

    Someone at - it ideas?

    Thank you!

    He was captured on Windows Server 2003 x 64 running on W7 x 64

    Also note that when users choose to save him, it opens fine.  This isn't an "acceptable workaround solution.

    Looks a lot like this one: http://blogs.vmware.com/thinapp/2011/01/locally-installed-applications-and-integration-with-virtualized-internet-explorer.html

  • Indicate the file paths in CS4/Mac

    Fireworks CS4/Mac and Dreamweaver CS4/PC all show paths of one of the documents currently viewed or all open somewhere on the User Interface.  Is there an easy way to get DW CS4 for Mac show the path of the currently open document?

    It is a concern for me as most of my Web pages have the name index.php and I get easily confused.

    Position the mouse pointer on the tab of the document at the top of the Document window. The full path should appear as a ToolTip.

    You can also quickly navigate between open documents by clicking on the button Open Documents at the top of the coding toolbar, which is visible in Code view, and split view. This is a list of all open documents, referred to by the full path name.

  • Office sync with two Macs leads to duplicate the files/folders

    Hi all

    I m using MacOS Sierra sync with desktop (and documents). Logged into my account, are two Macs (Air and a MB Pro). No I find in my iCloud drive a documents folder (it's good and the documents of the MB Air folder) and in this case a "Dokumente - MacBook Pro mg" folder which is the folder documents of my MB Pro (this is not so good). This isn't what I expected, I expected to have a documents folder which is identical on both machines. Does anyone know what I need to adjust to get things clear?

    Greetings from the Germany

    Mike

    I posted an article that explains all this to http://www.quecheesoftware.com/iCloud.html . This is a downloadable PDF file.

    Basically, you add to the folder Documents after activation of the synchronization of the files will be synchronized as you expect. But the files that were in your Documents on several Mac folders when you switch on for the first time on the synchronization will be placed in specific subfolders to your new folder of Documents iCloud Drive device. Apple apparently felt that he could not predict how each user would want their old files organized in the folder of Documents Drive iCloud, so Apple left to each user to reorganize the file later.

    I have now moved all my own files on the first level of my folder of Documents Drive iCloud and trashed the duplicate of the other device-specific folder. Now, everything syncs between computers, as expected. I left the two subfolders of specific to the device in place, either two empty for now, in case in the future that I might want to keep some files associated with one of the devices - for example, the alias files do not work on the other Mac. They will always sync in another subfolder, but at least I know to use it only on their own device.

    Apple certainly could have documented it better.

  • How to return a step towards the column in mac when you save the file

    Often when I save files to the web, I want to go back just one step of a subfolder for the column instead of going all the way back to the folder root in the sidebar. How can I return just one step?

    Order arrow up.

    In a file dialog box, you can also click on the drop-down control that lists the current directory. This will show you the hierarchical path. In the Finder, control-click on the title of the window.

    https://support.Apple.com/en-GB/HT201236

  • Windows Media Player will not play music files - need to reset the file path

    I'm trying to access my music on an external drive (g) using windows media player. The player is looking for music in the E: drive, which is a separate external drive that my friend uses for its iTunes. How to reset the path to the file for windows media player? It gives me the possibility of rerouting individually paths files, but not a lot of re - routing. I have reset the default settings, reinstalled the drive external, even enabled/activated on WMP (of the Panel).

    I tried. The drive G:\ was included in the WMP library before this problem (and to make sure, I deleted and added it). Despite this, the paths for each song pointed toward the drive E:\.  I solved the problem by deleting all of your WMP library (not files) and restart the media player. The files were then reread with the correct file paths.

  • Popup 'Select the file path' block 'Open the file' vi

    When popup 'Select File Path' by clicking on the "browser button", vi "Open file" will be blocked.

    I found when I tried to select a file in popup "Select path", the newspaper system stop recording.

    Is this true?

    Any suggestion? (This will help if the vi for the syslog for the readmission of the value). I need the newspaper to keep on going even when someone clicks and the path of the file browser popup.

    Thank you.


  • Cannot delete the file - paths are too long

    Trying to delete a folder.  He complains that the folder contains items whose names are too long for the Recycle Bin.

    The problem I think is that this folder is a backup copy of an old folder AppData, in which it seems to be an almost infinite folder "Application Data" series - I am sure that these are in fact the links as opposed to records, but there is a huge tree full of them.  At the end of some branches, there are some 'real' files, but then several sub-branches of Application Data files.

    So I guess that when I try to remove the top-level folder, the full path to the way in which the files down is just too long.

    When I shift-DELETE, nothing happens, and I tried to remove it from the command prompt, nothing helps.

    Don't know what to do next.  I want to just get rid of the folder tree.

    Mike

    OK, well, irritating as it is that there is no apparent way to force Vista to do, I just crossed the entire folder structure and renamed each 'Application Data' folder to 'a', to shorten the overall paths, and this then allowed me to remove the top-level folder.

    Mike

  • Guest VM Mac - IP address and the file copy host

    Hi all

    I'm involved with the automatic configuration of the guest virtual machines in Mac. In this context, I want to start and stop the virtual machine automatically. Also, I want to copy files between the host and the guest and launch programs automatically in the comments.

    -


    System details:

    VMware Fusion: Version 3.1.1 (282344)

    Host of Office Mac: OS X 10.5.8

    Comments to VMware Mac: OS X 10.6.2 Server 64-bit

    VMware Tools installed

    -


    1. I am able to use the vmrun as 'start', 'stop' commands, etc. But I'm unable to use the controls of the operating system called as 'runProgramInGuest' and 'copyFileFromHostToGuest '. I understand an exhaustive search, Mac Guest VM does support all the vmrun commands. Please specify if this isn't the case.

    2. because the vmrun commands do not work, and I always want to copy files to the guest, I try to get the IP of the host Mac address to connect to the FTP host - essentially treat them as 2 different machines on the network. Please specify whether it is possible to get the IP address of the Mac Guest VM and copy the files in the manner described.

    Thanks in advance,

    Hema

    Hi Hema,

    Welcome to the forums.

    I have no experience with the Fusion, but I had to work on the same problem with VMware Player. If your guest is using NAT network connection, you should be able to find its dynamic IP address in the DHCP leases file placed at:

    -/var/db/VMware/vmnet-dhcpd-vmnet8.leases

    As long as you know its mac address, you should find its IP address.

    It may be useful

    Concerning

    Franck

  • Read in the name of the file + path using command line arguments

    Hi guys,.
    I'm trying to use command line arguments to read two file names. The code below works as long as the files are on the class path.
    public class cmdLineArguments {
         
         public static void main(String[] args) {
              String xmlFile1 = args[0];
                    String xmlFile2 = args[1];
                   
              System.out.println ("\nXmlFile1: " + args[0] + "\nXmlFile2: " + args[1]);
         }
    }
    I would like to be able to read files that are not on the classpath as well by entering the full path as well as their names.
    In other words, it works if I type:
    C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs file1.xml file2.xml
    but not if I type:
    C:\Documents and Settings\user\workspace\CmdLineArgs\src>java cmdLineArgs c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xml
    What would someone please explain how I can modify the code to make it work? I guess I could take both a string, change them manually (add a------it etc.), but y at - it an easier way to do it? Even a reference to a tutorial, article etc. on this matter would be much appreciated.

    In addition, no idea why compile, execute code fine in Eclipse but would create an error in command line?

    Thank you very much.

    You must learn more about cmd.exe that is used to process the command line. The arguments passed to any program is the command line separated at whitespace so your command line arguments of

    c:\Documents and Settings\user\desktop\file1.xml c:\Documents and Settings\user\desktop\file2.xml
    

    turns into a table of

    "c:\Documents", "and", "Settings\user\desktop\file1.xml", "c:\Documents", "and", "Settings\user\desktop\file2.xml"
    

    In other words, instead of 2 arguments you actually have 6.

    To bypass this file names must be enclosed in quotes

    java cmdLineArgs "c:\Documents and Settings\user\desktop\file1.xml" "c:\Documents and Settings\user\desktop\file2.xml"
    
  • How to remove the file/path name using the SDK

    I have a program that uses the Acrobat SDK from Adobe kit. It creates the aPDF file from a HTML file that is created after the jugs of program data. It can create PDF very well, but how can he do with on the file name and path in the lower left corner. Insert us the PDF file created in another document and that you do not want to display the data on these pages created.

    Sought through this site and can not see mentioned.   Help!

    How do you convert from HTML to PDF format?

  • Return the file path

    Can what kind of command I use to return the path of the after effects project?

    Also, is there a way to call a python script from the script or even embed a python function in the script itself? We have some libraries for management of files we use to nuke and some of the features that I'll need to recreate in extendscript, but if it was maybe a way to call these functions and return a value, it could save me some time not to reinvent the wheel.

    The full path would be:

    App.Project.file.Path + "/" + app.project.file.name

    (assuming that the project has been saved).

    I'm not sure of the python stuff, but I suspect that you can not do. Please report if you find otherwise.

    Dan

  • How to find/replace the file path

    Hi all

    How can you find where your collections are stored in the bridge?  How can you change this default file path?

    Thank you!

    R

    On Windows 7 is the collections folder:

    C:\Users\USERNAME\AppData\Roaming\Adobe\Bridge CS5\Collections

    You cannot change this location.

    The collections are text files containing the location of the selected files, and the files in the collection has an extension of .filelist

  • File name of the Image displayed in PSE 8 does not match the file path name in Windows 7

    I recently got a new computer. I've updated on my computer Windows XP of PSE 5.0 to 8.0 PSE.  Then, I moved my files to the new computer that is running Windows 7, following the instructions that I have received on a previous post.  I copied the catalog file and the image files on the C drive of the old computer to the new computer (file catalog to the specified location in the information system;  images of my images).   Everything seems to have worked beautifully without having to go through a great struggle to reconnect.  The organzer seems to have found all of the images and I can put them in the editor as well.  However, when I look at the properties of a given image displayed full file name is that it was on XP: C:\Documents and Settings\ < username > \My Documents\My Pictures\ < folder name >-< Filename > rather than the path as it is in Windows 7, i.e. C:\Users\ < username > \My Pictures\ < file name >-< Filename >.  I am new to Windows 7 then maybe miss me something unique to Windows 7 but I'd like information.

    You are using the alias of the special folder that Vista and Windows 7 create to maintain backward compatibility (Microsoft continues to change how and where are stored the documents of users).   On Windows 7:

    C:\Documents and Settings\\My Documents\My photos

    is a special type of alias in the file:

    C:\Users\\Pictures

    (AndC:\Users \My Pictures is yet another kind of Windows 7 special alias, a 'library', which includes the folder C:\Users\Pictures.)

    Whenever an application like PES refers to the old location, C:\Documents and Settings\\My Documents\My photos, Windows that automatically converts backstage in C:\Users\\Pictures.   But Windows Explorer is configured to prevent you to access C:\Documents and Settings\ interactively - only programs like PES are able to do.  Microsoft wants users of Windows Explorer to always use the name of 'new', C:\Users\\Pictures.

    In your case, your catalog contained the old paths of XP folder, and Windows is automatically translate on the fly for new paths, unbeknownst to PSE.

    Like most of the backward compatibility hacks, this does not work perfectly.  PSE believe that the old road and new road are two completely different cases.  I'm not positive, but I think that there are opportunities for PSE to get confused by that.   When you import new pictures, they get recorded in the Catalog under the new folder paths.

    In my previous recommendation about how to move to the new computer, I had assumed you would probably change user names and locations of photo and so you would have to make a reconnection, and you would not have met it.  If I thought that you were not have need to reconnect, I would have recommended not not using this method, but rather using Backup/Restore (my first recommended method) - my bad.

    It would be nice if your current catalog and the PES works pretty well.   But there is at least a small risk that the road of PSE will get confused by old and new folder names.  The best way to avoid this would be to start again and use the backup/restore method to move your catalogue, which is more effort on your part.  But because I do not understand the risk, I can't tell you if you should be worried about it.   No doubt do tests: editing, import and edition of new photos, use view > view of the location of the folder, try to rename and move the old photos and the new folders, try the Photo Downloader, etc.

  • Scan of the file: path/data not in the format specified in double

    Can you get it someone please let me know why it does not work?

    It's just a piece of sample code, to write data in a txt file and then read it.

    First, if a file already exists when I want to write in it and I chose 'Replace the file', he says stop and double track.

    Second, if I write a new file, it says: error 85: Scan failed. The input string does not contain data in the expected format.

    Attachment VI.

    EDIT: see post.

    Just for reference, I solved it by using the match VI pattern in a loop and then using the table of indexes for individual values.

Maybe you are looking for

  • copy and move entire folders

    I have a macbook, el capitan, with two user accounts.  I want to move entire folders from one user to another.  How can I do this?

  • X 360 spectrum: spectrum HP x 360 with Ubuntu: plug headphones is not turn off speaker

    Hiya, I just installed Ubuntu (Willy Werewolf) on my HP spectrum - most of the stuff worked right away, and I'm super happy with it. My biggest problem I've been struggling with is the sound: speakers are working perfectly, however when I plug in my

  • A100 - NIC not found Intel by the network boot floppies

    I intend to clone my old computer hard drive to the new computer Satellite A100.But efforts to start from a floppy disk (e.g. Norton Ghost or Simons PTbackup tools) has failed. The reason is that Pro 100 adapter Intel is not recognized. It's a PCI NI

  • Problem with keyboard HP Pavilion n004tx-15 Notebook PC

    Hello Sir, I have a problem with my keyboard, keys all work together. I can't even write if I press 'b' button in windows help and support opens. Is that I copy paste the b word.and same way to many keys work together as if I perss e key in this case

  • whence the virus vista 2010 security malware?

    I followed the instructions on this site for download anti malware bytes and scan and deleted the infected files and it work for a few weeks.  but the Vista security popup boxes began to appear today still.  Whence the infection?  What types of legit