Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Copy, Cut and Paste files

Posted on 1999-01-09
5
Medium Priority
?
298 Views
Last Modified: 2010-05-03
Is there any possibility to cut, paste and copy files when using FileListBox. If there is, how? What are the codes?
0
Comment
Question by:Ecmil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 200 total points
ID: 1455062
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
 

Author Comment

by:Ecmil
ID: 1455063
Adjusted points to 100
0
 

Author Comment

by:Ecmil
ID: 1455064
I want to cut, paste and copy files like in the explorer
0
 

Author Comment

by:Ecmil
ID: 1455065
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
 
LVL 12

Expert Comment

by:mark2150
ID: 1455066
'
' 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question