阵列容量? [英] Array capacity?

查看:102
本文介绍了阵列容量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的
美好的一天...

我正在尝试将大量文件从一个目标复制到另一个目标.我将文件名分配给一个数组,然后从该数组中读取文件名以将其复制到目标位置.

问题是当我有大量文件(例如5000个文件)时,程序仅将101个文件复制到目标位置.那么,阵列容量有什么限制吗?
请帮助我或建议我另一种用于复制大量文件的解决方案.

复制代码如下:

Dears
nice day...

I am trying to copy large count of files from one destination to another. I assigned the file names to an array and then read file name from that array to copy it to the destination.

The problem is when I have a large count of file such as 5000 files, then the program copies only 101 files to the destination. So, is there any limitation on an array capacity or what?
Please help me or suggest me another solution for copying large count of files.

the code for copying is bellow:

Dim a As Integer
Dim ov As Boolean
            a = FileListBox1.SelectedItems.Count
            Dim farra(a) As String
             
 For i = 0 To FileListBox1.SelectedItems.Count - 1
        farra(i) = FileListBox1.SelectedItems.Item(i)
        File.Copy(FileListBox1.Path & "\" & farra(i), FileListBox2.Path & "\" & farra(i), ov)

 Next

推荐答案

列表框中是否显示了所有文件?

您是否尝试过仅复制所有文件而无论是否已选择它们?

您是否在调试器下运行它?您发布的代码并没有显示太多.
Are all of the files shown in the listbox?

Have you tried just copying all of the files regardless of whether or not they''ve been selected?

Have you run it under the debugger? The code you''ve posted doesn''t really show much.


这篇关于阵列容量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆