Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Sound 1 CuePoint
Retrun Properties on a Sprite
Precision Xtra
Get the computer name of user
DM Transition Pack 1
Sound pan, rate shift
Tint bitmap behaviour
Rollover Trigger-Alphamania
Attr
ADOXtra Lite
MediaMacros Xtras Mall
 

 

 

Behavior Behaviour to copy files, handy for backup files

Added on 4/25/2003

 

Compatibilities:
behavior D8 D8_5 PC

Required Xtras:
Buddy API

This item has not yet been rated

Author: marcelaal

Script to put on a button, where you can copy files with. You can select the folder to copy from, and copy to. Also you can select the file extension to copy. Uses Buddy API. I use the script to back-up a cd-rom. Got it auto-run on the cd-rom. Also very handy to find for example all .doc files in a folder. The files are copied to another folder.

Download PC Source
-- Behaviour to copy files
-- You can select the folder where to copy from
-- also you got the choice to select where to copy to

global extension    
global copyTo        
global copyFrom
global goAgain
global checkStatus

on mousedown me
  set extension = member("ExField").text
  set copyFrom = baGetFolder( the applicationPath,"Please select a folder to copy from:",1,"Select folder to copy from",-1,0)
  set copyTo = baGetFolder( "c:", "Please select a folder to copy to:", 1, "Select a folder to copy to", -1, 0 )
  cursor 4
    
  set checkStatus = baXCopy( copyFrom , CopyTo , "*."&extension , "Always" , false)
  
  if checkStatus = 0 then
    cursor -1
    beep
    delete line 1 of member "ExField"
    
    set goAgain = baMsgBoxEx( "Copy any other files?", "Quit or Continue " , "No quit","Yes copy more","","Question" , 1 , "center", "Arial", 12, 4, 512, 384 )
        
    if goAgain = "No quit" then
      quit
    end if
    
    if goAgain = "Yes copy more" then
      go to frame 1
    end if
    
  else
    alert "Some error accured"
  end if
end

on getPropertyDescriptionlist me
  p_list = [:]
  addProp p_list, #extension,[#format:#field,#default:"FieldName",#comment:"Select the field member"]
  return p_list
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail