Get filename and write... with Apple Script

Discussion in 'Mac Programming' started by vloryan, May 28, 2015.

  1. vloryan, May 28, 2015
    Last edited: May 28, 2015

    vloryan macrumors member

    Jan 11, 2014
    hi guys, i hope you can help me with this:

    whenever a zip file named "" is placed in a folder , i want applescript to get that filename (without the extension: "whatever") and create a new and empty textfile ("whatever.txt")with that name in that same folder.

    any idea? thanks for your help!
  2. subsonix macrumors 68040

    Feb 2, 2008
    You can do this with a folder action in Automator. But are you sure you want a unique empty text file for each file and folder that gets dropped in your folder? You can also add them as entries in a text file, or to the system log with an added tag that you later can filter on in

Share This Page