File Paths

What is a File Path?

A file path helps specify where a file or folder is located on your hardrive or network, so that Fuga can find it. Fuga has a variety of different ways you can specify the location of a file, which give you flexibility in how you store your digital assets.

Types of File Paths

Absolute Paths

The absolute path is the complete path of the file, starting with your hard drive and working its way down through the folder structure. You can easily browse for the absolute path of your files or folders by clicking the “…” button next to a path field in an action’s parameters.

If your familiar with older versons of Windows, up through XP, you’ll already familiar with how absolute paths are written. In XP, the absolute path of a folder appears at the top of the Windows Explorer. To get the file path for an individual file in Windows, you can right click on the file, and select properties. On a mac, it’s a little bit harder to find the absolute path fo the file, but you can find pieces of it under the object info.

If the file is on your local hardrive, the absolute path should start with the name of the hardrive (which is normally C or D on a PC, or something custom on a Mac), then a backslash on a PC or a colon on a Mac, then each folder separated by a backslash or a colon. If it’s the absolute path of a file, the last part will be the file name and its extension.

Since you can browse for files using Fuga, you don’t have to remember the absolute path for a file, you just have to know when you’re using it versus a relative path or file name.

Examples of Absolute Paths

The absolute path for a file on a mac.

PC
C:\WindowsUsersName\MyDocuments\ProjectMyFile.indd
Mac
My Hardrive Name:Users:My Name:My Documents:Project Name:MyFile.indd

On a server, the absolute path will have a similar structure, but starts with the server name instead.

How to Browse For the Absolute Path of a File or Folder Using Fuga

To browse for a file or folder in Fuga to get its absolute path:

  1. In the Parameters area for the action that uses the file or folder:
    1. Click the button with three dots (…)
    2. In the browser window that appears do either of the following:
      • For a folder (in the Set Directory action): single click the folder name and click choose.
      • For a file: double click the file name.

Using the Ask Action to Get an Absolute Path

In general, using an absolute path in an action’s parameters directly is not recommended, since the absolute path of a file changes frequently whenever files are moved around or if the document with the flow is moved to another computer. So, to avoid having to remember to edit the absolute path for a file (which may appear many times throughout a flow) we recommend using the Ask action to ask the user for the absolute path of a file, storing it in a variable, and then using that variable instead of the path directly.

Ask Example

Action Setup


Action Results

Relative File Names

When you’re using Fuga, you can simply provide a file name or a variable containing the file name (as opposed to the whole file path). Then you can tell Fuga to check for this file inside a specific folder (i.e. directory). This directory can be your InDesign directory, your Images directory, or another directory. Each of these directories aside from your InDesign document directory needs to be set using the Set Directory action.

In some actions, you can also tell Fuga to look for files based on its partial file name (and Fuga will search a specified directory for files that contain that piece of the name) or tell Fuga to search a directories subfolders for the file.

Relative To Current Document Directory

Finds the file in the same directory as the current document.

Finds the file in the DataFiles directory under the current document directory.

 

Once you save your InDesign file, you can specify files as being relative to your InDesign document. This tells Fuga to check for your file inside the same folder as your InDesign document. On most actions that use files you can additionally specify that Fuga should check or the file within folders within the same folder as your InDesign document (using the Search Subfolders checkbox).

Relative to Another Directory

All other directories besides the current document directory must be set using the Set Directory action, so that Fuga knows where the directory is located.

Set Directory Example

The Database Directory is set using the Set Directory action.

These parameters tell Fuga to look for the file named data.csv in the Database Directory set in the Set Directory action.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>