• 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
Re: Jon's commands renameFile not working?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jon's commands renameFile not working?


  • Subject: Re: Jon's commands renameFile not working?
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 10 Mar 2010 15:56:56 -0800
  • Thread-topic: Jon's commands renameFile not working?

 AppleScript dictionary writing used to be an art  : (

>
> Files and folders suite
> In this dictionary, alias must be understood as alias or posix path or
> url.
> filenew v : create a new empty file, fail if already exists.
>
> filenew alias : the destination folder, or a file path.
> name string : the file name. If the name parameter is not provided,
> the direct parameter is considered as the destination file path.
> → alias : the new file
> mkdir v : create a new folder.
>
> mkdir alias : a folder path
> [name string] : a relative url
> → alias : the new folder
> openfork v : .
>
> openfork file : a file path
> permission integer : 1 read, 2 write, 16 deny read, 32 deny write
> [timeout real]
> → integer
> openfd v : .
>
> openfd file : a file path
> permission integer : read 1, write 2, not blocking 4, append 8,
> exclusive file lock 32, synchronous writes 128
> [timeout real]
> → integer
> setposfork v : .
>
> setposfork integer : a file refnum
> [mode integer] : fsFromStart 1, fsFromLEOF 2, fsFromMark 3.Default 1
> offset real
> closefork v : .
>
> closefork integer : a file refnum
> closefd v : .
>
> closefd integer : a file refnum
> flushfork v : .
>
> flushfork integer : a file refnum
> filelock v : given a file, attempt to create or update an
> associated .lock file by appending '.lock' to the original name. An
> expiration delay is stored in the .lock file. filelock fails if
> the .lock file already exists and is still valid.
>
> filelock alias : the file to lock.
> [timeout real] : the expiration delay in seconds. Default: no timeout
> → alias : the .lock file.
> The following error numbers are specific to the locking process:
> ‧ -3 a still valid .lock file already exists. The partial result of
> the error contains the remaining expiration delay,
> ‧ -4 can't create the .lock file,
> ‧ -5 can't write the .lock file,
> ‧ -6 can't read the .lock file,
> ‧ -7 unknown file format.
> filelockinfo v : return info for a .lock file
>
> filelockinfo alias : the .lock file
> → record
> filecopy v : copy a file synchronously
>
> filecopy alias or list of alias : the file(s) to copy
> [from alias] : the base url. Relevant if direct parameter is a string
> or a list of strings.
> [to alias] : the destination folder. Required unless the "filepath"
> parameter is specified
> [name string] : the new file name (when using the "to" parameter). Not
> allowed if the direct parameter is a list. Default: the original file
> name
> [filepath file specification] : an alternative to the use of the "to"
> and "name" parameters: the destination file path. Not allowed if the
> direct parameter is a list
> [into file specification] : for backward compatibility. Same as as
> filepath.
> [replacing boolean] : allow to replace an existing item. Default: false
> → alias : the copied file
> filemove v : move a file synchronously
>
> filemove alias or list of alias : the file(s) to move
> [from alias] : the base url. Relevant if direct parameter is a string
> or a list of strings.
> [to alias] : the destination folder. Required unless the "filepath"
> parameter is specified
> [name string] : the new file name (when using the "to" parameter). Not
> allowed if the direct parameter is a list. Default: the old file name
> [filepath file specification] : an alternative to the use of the "to"
> and "name" parameters: the destination file path. Not allowed if the
> direct parameter is a list
> [into file specification] : for backward compatibility. Same as as
> filepath.
> [replacing boolean] : allow to replace an existing item. Default: false
> → alias : the copied file
> fileremove v : remove a file synchronously
>
> fileremove alias or list of alias : the file(s) or folder(s) to remove
> [from alias] : the base url. Relevant if direct parameter is a string
> or a list of strings.
> [filesonly boolean] : False : delete the item(s) of direct parameter.
> True : delete only files and handle a folder in the direct parameters
> as the list of its files. Default: false
> [after date] : allowed only with filesonly true
> [before date] : allowed only with filesonly true
> [locked files boolean] : if true, remove also locked files. Default true
> [busy files boolean] : if true, remove also busy files. Default true
> fileunlink v : remove a single file synchronously (this command do not
> remove folders)
>
> fileunlink alias : the file to remove
> create symlink v : create a symlink
>
> create symlink alias : the target of the new symlink. Can be an alias
> or a string (a valid posix path, not quoted, without space.)
> in alias : the folder where to create the symlink
> [name string] : the new file name. Default: the name of the symlink's
> target
> [replacing boolean] : allow to replace an existing symlink. Default:
> true
> testsymlink v : return true if the direct parameter is a symlink,
> false otherwise
>
> testsymlink alias or string : in case of an alias, the symlink will be
> resolved: prefer providing an url or an unix path.
> → boolean
>   Example
> filegetname v : returns the name of a file
>
> filegetname alias or list of alias
> → string : the file name
> filerename v : rename a file
>
> filerename alias
> to string : the new file name.
> → alias : the renamed file
> flush volume v : flush the volume relative to the direct parameter
>
> flush volume alias : a file reference

 _______________________________________________
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

References: 
 >Re: Jon's commands renameFile not working? (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Jon's commands renameFile not working?
  • Next by Date: Who rang?
  • Previous by thread: Re: Jon's commands renameFile not working?
  • Next by thread: Re: Jon's commands renameFile not working?
  • Index(es):
    • Date
    • Thread