         // Extract from URL
         
         self.url = url
+        
+        self.type = ScriptDescriptor.extensions.first { $0.value.contains(url.pathExtension) }?.key ?? .unknown
         
         var name = url.deletingPathExtension().lastPathComponent
         

    /// - returns: An instance of `Script` created by the receiver.
    ///            Returns `nil` if the script type is unsupported.
    func makeScript() -> Script? {
        if self.isAppleScript {
            return AppleScript(with: self)
        } else if self.isShellScript {
            return ShellScript(with: self)
        } else {
            return nil
        }
    }
}

    let ordering: Int?
    let shortcut: Shortcut
    let eventTypes: [ScriptingEventType]
    let type: ScriptingFileType
    
    
    
    // MARK: Private Properties
    
    private static let extensions: [ScriptingFileType:[String]] = [
        .appleScript: ["applescript", "scpt", "scptd"],
        .shellScript: ["sh", "pl", "php", "rb", "py", "js"]
    ]
    
    
    
