• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Invisible File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invisible File


  • Subject: Invisible File
  • From: Gil Dawson <email@hidden>
  • Date: Sat, 02 Mar 2019 16:54:03 -0800

Using MacOS 10.11.6, Script Editor 2.8.2 and AppleScript 2.5,

I wish to create a new text file using, e.g.,

set QifFileName to "Gil's Data 2003-7 B4 House"

set TxtFilePath to QIFnListsFolder & QifFileName & ".txt"

try
        close access POSIX file TxtFilePath
end try
open for access POSIX file TxtFilePath with write permission
write "Test Line" & return to POSIX file TxtFilePath starting at eof as text
close access POSIX file TxtFilePath

After executing this script, the file does not appear in the corresponding
Finder window.

Other files in the same folder are visible, just not this one.

Changing among the four Finder window views does not help,
nor does clicking on a different folder then back,
nor does opening a new Finder window then navigating to the folder.

I don't think it's a timing thing.  The effect persists indefinitely.

The file exists in other aspects.  For example,

An alias succeeds, as in:

on FileExists(POSIXFilePath)
        set ItExists to false
        try
                alias POSIXFilePath
                set ItExists to true
        end try
        return ItExists
end FileExists

The file does appear in the Open dialog for TextWrangler.  I can open it, and
the text is there.

The TextWrangler Save As... dialog also sees it, and alerts ("already exists")
if I click Save.

If I choose Replace, then the file immediately appears in the Finder window.

Most curious.  Any ideas?

--Gil


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Invisible File
      • From: Yvan KOENIG <email@hidden>
    • Re: Invisible File
      • From: Bob Stern <email@hidden>
  • Next by Date: Invisible File Generator V1
  • Next by thread: Invisible File Generator V1
  • Index(es):
    • Date
    • Thread