All is in the title ...

I want to select some files like this :
Code: Select all
answer files "Select a file to upload" with type filtreFtp
I hope someone will be able to help me.
Best to all.
Dominique.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
answer files "Select a file to upload" with type filtreFtp
Code: Select all
function tFileSize tFile
set itemdel to "/"
put the directory into altdir
## Get the necessary infos from the path
put item 1 to -2 of datei into tFolder
put item -1 of datei into tFilename
## Set the directory to the folder that has the file inside
set the directory to tFolder
## Check "the long (detailed) files" in the Rev dictionary!
put the long files into tlf
put lineoffset(urlencode(tFilename),tlf) into tLine
set itemdel to ","
put item 2 of line tLine of tlf into tSize
## RESET the directory!
set the directory to altdir
## Size in Bytes
return tSize
end tFileSize
Code: Select all
...
answer files "Select a file to upload" with type filtreFtp
put it into tFile
if tFile is not empty then
put tFileSize(tFile) into tFileSize2
## now check tFileSize2 and act accordingly...
end if
...
Code: Select all
function tFileSize tFile
set itemdel to "/"
put the directory into altdir
## Get the necessary infos from the path
put item 1 to -2 of tFile into tFolder
put item -1 of tFile into tFilename
## Set the directory to the folder that has the file inside
set the directory to tFolder
## Check "the long (detailed) files" in the Rev dictionary!
put the long files into tlf
put lineoffset(urlencode(tFilename),tlf) into tLine
set itemdel to ","
put item 2 of line tLine of tlf into tSize
## RESET the directory!
set the directory to altdir
## Size in Bytes
return tSize
end tFileSize