Solved

Copy, Cut and Paste files

Posted on 1999-01-09
5
290 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
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 100 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now