Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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