|
|
|
Behaviour to copy files, handy for backup files
Added on 4/25/2003
|
|
Compatibilities:
Required Xtras:
Buddy API
|
This item has not yet been rated
|
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
|
|