Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Knowing where your files are

In Word and other apps that store files there's often a menu item entitled "Properties" or something like it. This tells you, among other things, where the file is stored.


I created a document in Pages and it seemed that it saved it in my iCloud account although I didn't realize it at the time. Later I saved it locally on my MBP. (And then I saved a copy on my server as a backup.) Now I'm not sure when automatically Pages opens the previously saved file if it's in iCloud, on my MBP, or on a server on my network.


I can't seem to find something that simply tells me where the file that I'm working with is stored.


I'd appreciate some help or a link to something in the knowledge base.


Thank you.

MacBook Pro with Touch Bar

Posted on Feb 21, 2020 10:35 PM

Reply
Question marked as Best reply

Posted on Feb 22, 2020 4:27 AM

Hi orchestramusic,


Click on the "v" to the right of the document name to see "Where:"



Regards,

Ian.

Similar questions

3 replies

Feb 22, 2020 8:11 AM in response to orchestramusic

Pages remembers its last document saved folder location. That will be the default on subsequent saves, unless you catch it and choose another destination. The following was tested with Pages v8.2.1 on Mojave (10.14.6).


Without opening Pages, or hunting for a last saved file location, AppleScript can tell you where that last saved folder location resides, by asking the Pages preference list (.plist):


use framework "Foundation"
use AppleScript version "2.4" -- macOS Yosemite 10.10 or later
use scripting additions

property NSString : a reference to current application's NSString

-- get the last directory location that Pages saved too.
set lastFolder to (do shell script "defaults read com.apple.iWork.Pages NSNavLastRootDirectory")

if not lastFolder is "" then
	set relpath to NSString's stringWithString:lastFolder
	display dialog (relpath's stringByStandardizingPath) as text
else
	display dialog "Pages last saved folder not found"
end if
return


Pages always stores the last saved location as a tilde (~) path if located in your home directory, or icloud destination. I convert that path to an explicit, full path in the above code. Anything stored on iCloud will have your local Mobile Documents folder in the output path.


From Dock : Launchpad : Other, click on Script Editor. Copy/paste the above AppleScript code into it, and click the hammer (compile) icon. The text will change colors which indicates a good compile. Then just click the run button. You can save this AppleScript as a script (scpt), script bundle (scptd), or application (.app) on your Desktop, where you can run it with a double-click.




Knowing where your files are

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.