<doc>
  <legacy_id>1061</legacy_id>
  <name>revDeleteFolder</name>
  <type>command</type>
  <syntax>
    <example>revDeleteFolder <i>folderToDelete</i></example>
  </syntax>
  <library>Common library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>The System Environment</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="answer folder">answer folder Command</command>
    <command tag="create folder">create folder Command</command>
    <command tag="delete file">delete file Command</command>
    <function tag="folders">folders Function</function>
    <command tag="revCopyFolder">revCopyFolder Command</command>
    <command tag="revMoveFolder">revMoveFolder Command</command>
  </references>
  <history>
    <introduced version="1.1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Removes a <property tag="defaultFolder">folder</property> and all its contents.</summary>
  <examples>
    <example>revDeleteFolder "/data/Backup Folder"</example>
    <example>revDeleteFolder myTempFolder</example>
  </examples>
  <description>
    <p>Use the <b>revDeleteFolder</b> <control_st tag="function">function</control_st> to remove a <property tag="defaultFolder">folder</property> from the disk.</p><p/><p><b>Parameters:</b></p><p>The <i>folderToDelete</i> specifies the <glossary tag="file path">name and location</glossary> of the <property tag="defaultFolder">folder</property>. If you specify a name but not a location, LiveCode assumes the <property tag="defaultFolder">folder</property> is in the <property tag="defaultFolder">defaultFolder</property>.</p><p/><p><b>Comments:</b></p><p>The <b>revDeleteFolder</b> <glossary tag="command">command</glossary> removes the entire <property tag="defaultFolder">folder</property>, including all <function tag="files">files</function>, <glossary tag="subfolder">subfolders</glossary>, and their contents.</p><p/><p>The <b>revDeleteFolder</b> <glossary tag="command">command</glossary> uses system services on each <function tag="platform">platform</function> to perform the move. On <glossary tag="Mac OS">Mac OS</glossary> and <glossary tag="OS X">OS X systems</glossary>, it uses <href tag="glossary/Writing_Tr/381.xml">AppleScript</href>; on <function tag="openStacks">Windows</function> and <glossary tag="Unix">Unix</glossary> systems, it uses the <function tag="shell">shell</function> <control_st tag="function">function</control_st>. Any errors encountered are <glossary tag="return">returned</glossary> in the <function tag="result">result</function> <control_st tag="function">function</control_st>.</p><p/><p>On Mac OS and OS X systems, the <b>revDeleteFolder</b> <glossary tag="command">command</glossary> places the <property tag="defaultFolder">folder</property> in the Trash.</p><p/><p><code/><img src="202650"/> <b>Caution!</b><code/> This <glossary tag="command">command</glossary> can be used to rename or move <function tag="files">files</function> and <function tag="folders">folders</function> your stack did not create. Of course, a <object tag="stack">stack</object> should not rename or move <function tag="files">files</function> and <function tag="folders">folders</function> it didn't create without obtaining explicit confirmation from the user.</p><p/><p><code/><b>Note:</b><code/> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Common library">Common library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>revDeleteFolder</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>revDeleteFolder</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>