Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Label Search code
All_In_One Button Hue Shift
Print a file with associated program
TaskXtra
Hold Till Flash Directmedia finishes playing
LiveCD
Menu bar emulator
Impressario Thumbnail Slider
Find angles of a right triangle
Set the blend of Sprite
 

 

 

Behavior Generic behavior to copy a file

Added on 1/21/2002

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 PC UK US

Required Xtras:
Desktop Xtra

This item has not yet been rated

Author: Shockdev

Shows how to copy a file to the Windows folder

-- Generic behavior to copy a file
-- Desktop Xtra 1.0 or later required
-- Compatibilities: Director 6.x, 7.x, 8.x, Windows

property SourcePath, DestinationPath

on getPropertyDescriptionList
  set file = "mypicture.bmp"
  set WinPath = dtGetWindowsDirectory()
  set description = [:]
  addProp description, #SourcePath, [#default: the moviePath & file, #format:#string, #comment:"Source Path:"]
  addProp description, #DestinationPath, [#default: WinPath & "" & file, #format:#string, #comment:"Destination Path:"]
  return description
end

on getBehaviorDescription
  return "            " &
  "- -    Copy File Bahavior    - -" & RETURN &
  "Copies a file to the Windows folder."
end

on mouseDown
  copyFile
end

on copyFile
  set Ok = dtCopyFile(SourcePath, DestinationPath, "")
  if getAt(Ok,1) <> 0 then
    -- Error
    alert("Error: " & getAt(Ok,1) & " - base error code")
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail