• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Copy, Cut and Paste files

Is there any possibility to cut, paste and copy files when using FileListBox. If there is, how? What are the codes?
0
Ecmil
Asked:
Ecmil
  • 3
  • 2
1 Solution
 
mark2150Commented:
Cut, paste, copy *files*?????

Ummm, no (assuming I understand what you're asking). You do the normal file copy stuff like you would on any binary file (open one for input, another for output and copy from in to out until EOF)

M

0
 
EcmilAuthor Commented:
Adjusted points to 100
0
 
EcmilAuthor Commented:
I want to cut, paste and copy files like in the explorer
0
 
EcmilAuthor Commented:
How do I do the normal file copy stuff like with any binary file
    (open one for input, another for output and copy from in to out until EOF) ?????
0
 
mark2150Commented:
'
' FileSpec$ = Full name/path of original file
' filnam$ = Root file name in local directory
'
' Ok, we want to copy in large blocks for speed, but we
' can't get too big or we'll run out of buffer
'
If Len(filnam$) > 0 Then
    rawsize = FileLen(filespec$)
    numblocks = Int(rawsize / 4096)
    fraction = rawsize Mod 4096
    Open filespec$ For Binary As #1
    Open maildir$ + filnam$ For Binary As #2
'
    If numblocks < 1 Then GoTo copytail
    '
    For cindex = 1 To numblocks
        bite$ = Space$(4096)
        Get #1, , bite$
        Put #2, , bite$
    Next cindex
    '
copytail:
    If fraction > 0 Then
        bite$ = Space$(fraction)
        Get #1, , bite$
        Put #2, , bite$
    End If
'
    Close
End If
'

0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now