untitled text files

1,216 views
Skip to first unread message

Greg Reyna

unread,
Jun 9, 2016, 5:06:10 PM6/9/16
to BBEdit Talk
Is there a way to learn the creation date of an unsaved, "untitled text" file? I never have reset the numbering so it's up to 191.
I'm curious, where are these files stored, anyway?  The reopening of unsaved files  is a wonderful feature of BBEdit.

Thanks, Greg

WordWeaver777

unread,
Jun 9, 2016, 5:38:26 PM6/9/16
to bbe...@googlegroups.com

> On Jun 10, 2016, at 6:21 AM, Greg Reyna <grey...@gmail.com> wrote:
>
> Is there a way to learn the creation date of an unsaved, "untitled text" file?

Hello Greg. I read your question with curiosity, being as I had never considered this before. In fact, at first I thought it might be a joke, until I actually opened the message in Mail.app and read the entire thing.

My personal assumption would be that until a BBEdit text doc -- or any file for that matter -- is actually saved to the hard drive, it cannot have a creation date, because it is only being stored in memory.

Led by my curiosity, I created a brand new text doc, typed some nonsense in it, and then looked at the status bar that is located at the bottom of its window.

Sure enough, it simply says "(never saved)", whereas with a saved document, it would actually show when it was last saved.

Next, I looked under BBEdit's various menus. The only thing there is the "Get Info" option under the "View" menu, which you can obviously do with a "command-i" as well.

But, as you may have already determined yourself, opening the Get Info window does not reveal the creation date, perhaps confirming that until a file is actually saved to your hard drive, it cannot have a creation date.

Perhaps someone -- Rich? Patrick? -- with more experience than I can offer a more satisfying response.



Jakob Peterhänsel

unread,
Jun 9, 2016, 6:00:26 PM6/9/16
to BBedit Group
Hi,

Well, it has to be stored Somewhere, as a temp file, and in fact it is:

~/Library/BBEdit/Auto-Save Recovery/Data/<uuid>.txt

;-)

/Jakob
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "sup...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
>
> ---
> You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
> To post to this group, send email to bbe...@googlegroups.com.

WordWeaver777

unread,
Jun 9, 2016, 6:15:03 PM6/9/16
to bbe...@googlegroups.com

> On Jun 10, 2016, at 8:00 AM, Jakob Peterhänsel <maroo...@gmail.com> wrote:
>
> Hi,
>
> Well, it has to be stored Somewhere, as a temp file, and in fact it is:
>
> ~/Library/BBEdit/Auto-Save Recovery/Data/<uuid>.txt
>
> ;-)
>
> /Jakob

Indeed! A useful piece of information! :)

Alfredo

unread,
Jun 9, 2016, 9:15:51 PM6/9/16
to BBEdit Talk
Something is playing hide-and-seek here:

~ $ pwd

/Users/alfredo

~ $ cd /Users/alfredo/Library/Application\ Support/BBEdit/Auto-Save\ Recovery 

Auto-Save Recovery $ ls

Data

Auto-Save Recovery $ cd /Users/alfredo/Library/Application\ Support/BBEdit/Auto-Save\ Recovery/Data 

Data $ ls

Data $ 



Any hints?

Thanks.

Alfredo
BBEdit031.png

Rich Siegel

unread,
Jun 9, 2016, 9:19:20 PM6/9/16
to bbe...@googlegroups.com
On Thursday, June 9, 2016, Greg Reyna <grey...@gmail.com> wrote:

>Is there a way to learn the creation date of an unsaved,
>"untitled text" file? I never have reset the numbering so it's
>up to 191.
>I'm curious, where are these files stored, anyway?

Untitled documents don't correspond to any location on disk.
Periodically, a snapshot of untitled (and unsaved) documents is
created so that their contents may be restored when starting up,
but the snapshots are not themselves used as a location for the document.

There is no separate "creation date" property of documents,
irrespective of whether they were ever saved to disk.

So, to answer your question more directly: there is no way to
discover the creation date of an untitled document.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they
sedate me.

WordWeaver777

unread,
Jun 9, 2016, 9:39:44 PM6/9/16
to bbe...@googlegroups.com

On Jun 10, 2016, at 11:19 AM, Rich Siegel <sie...@barebones.com> wrote:


Untitled documents don't correspond to any location on disk. Periodically, a snapshot of untitled (and unsaved) documents is created so that their contents may be restored when starting up, but the snapshots are not themselves used as a location for the document.

There is no separate "creation date" property of documents, irrespective of whether they were ever saved to disk.

So, to answer your question more directly: there is no way to discover the creation date of an untitled document.

R.

Rich, I am rather confused by your response, because it does not seem to correspond with what I am seeing here . . . or perhaps I just don't understand what you are saying.

As I mentioned in my previous post, after we were advised to look in " ~/Library/BBEdit/Auto-Save Recovery/Data", I created a brand new text document, and just typed some gibberish in it, but I did not save the file.

However, just as the previous person had stated -- sorry, I forget his name, and I already trashed that email -- within a minute of creating that new untitled file, a new text file did in fact appear in the aforementioned path. I assume that these are the snapshots you are referring to.

But the point is, those files do have a creation date and a last modified date in their "Get Info" window, if you do a command-i on them from the Finder.

Of course, the problem is that these snapshots -- assuming that is what they are -- only have file names consisting of a series of letters, numbers and dashes, which I am sure you personally understand.

However, if you open the file, you can see its contents, and thus know if that is the file, the creation date of which you want to know.

That is why I am having difficulty understanding what you are saying.

Also, by saying "Untitled documents don't correspond to any location on disk", are you confirming what I suggested earlier that untitled files are only stored in active memory, which is why they would not yet have an address on your hard drive?

Just trying to understand here.

Thanks!

Christopher Stone

unread,
Jun 10, 2016, 6:23:22 AM6/10/16
to BBEdit-Talk
On Jun 09, 2016, at 15:21, Greg Reyna <grey...@gmail.com> wrote:
Is there a way to learn the creation date of an unsaved, "untitled text" file? I never have reset the numbering so it's up to 191.


Hey Greg,

As has been mentioned a creation date isn't available, however you can get a modification date.

----------------------------------------------------------------
tell application "BBEdit"
   tell front text document
      set AppleScript's text item delimiters to " "
      set modDate to {date string, time string} of (get modification date)
      set modDate to modDate as text
   end tell
end tell
----------------------------------------------------------------

# Newly created document
--> "Sunday, December 31, 2000 18:00:00"

# Modified document
--> "Friday, June 10, 2016 05:02:18"

----------------------------------------------------------------

--
Best Regards,
Chris

Rich Siegel

unread,
Jun 10, 2016, 8:43:06 AM6/10/16
to bbe...@googlegroups.com
On Friday, June 10, 2016, WordWeaver777
<wordwe...@gmail.com> wrote:

>As I mentioned in my previous post, after we were advised to look in "
>~/Library/BBEdit/Auto-Save Recovery/Data", I created a brand new text
>document, and just typed some gibberish in it, but I did not save the
>file.
>
>However, just as the previous person had stated -- sorry, I forget his
>name, and I already trashed that email -- within a minute of creating
>that new untitled file, a new text file did in fact appear in the
>aforementioned path. I assume that these are the snapshots you are
>referring to.

Correct.

>But the point is, those files do have a creation date and a last
>modified date in their "Get Info" window, if you do a command-i on
>them from the Finder.

Yes, but the dates on the snapshot files (and everyone is
*strongly* discouraged from messing around in the auto-save data
folder, by the way) do not reflect the creation and modification
dates of the untitled document.

>Of course, the problem is that these snapshots -- assuming that is
>what they are -- only have file names consisting of a series of
>letters, numbers and dashes, which I am sure you personally
>understand.

That's because they're internal data, not intended to be
user-visible. :-)

>Also, by saying "Untitled documents don't correspond to any location
>on disk", are you confirming what I suggested earlier that untitled
>files are only stored in active memory, which is why they would not
>yet have an address on your hard drive?

Correct.

Greg Reyna

unread,
Jun 12, 2016, 4:05:50 PM6/12/16
to BBEdit Talk
Thanks, everyone. I think understand.  When a file is created and not saved, BBEdit "saves" it internally, but no "creation date" is permanently linked to the file.  The file's text is saved to: ~/Library/BBEdit/Auto-Save Recovery/Data/<uuid>.txt , and the date on the file is current, but apparently, only until the next Reboot or Shut Down.  

In my case the file in question was created some time earlier this spring, but the creation & modification dates are June 7, which is the last time I quit BBEdit and Rebooted or Shut Down (can't remember which) my laptop.

thanks for the script, Chris.  I ran it and got the same June 7 date as Finder gave.
Reply all
Reply to author
Forward
0 new messages