.net中的FileSystemObject [英] FileSystemObject in .net

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

问题描述

好的我需要复制一个目录示例:


copyfolder(\\ com1 \tr,d:\\\\\,true)


如果我复制这个目录mi app不要复制,但如果我复制那个:


copyfolder(\\\\\\\ :\\\\\\\\\\\\\\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\


-

通过 http://www.dotnetmonster.com

Ok i need to copy a directory example:

copyfolder(\\com1\tr,d:\df\res,true)

if i copy this directory mi app dont copy but if i copy that:

copyfolder(\\com1\tr\tr1,d:\df\res,true)

the copy its correct whats up because i cant copy de content of the
directory by the firts way.

--
Message posted via http://www.dotnetmonster.com

推荐答案



您使用的是System.IO.Directory ,对吗?

只是预感,但该目录可能名为\\\\\\\ 1,这就是为什么它只复制第二种方式。


-

Dave Sexton
dave @ www..jwaonline .. com

------------------------------------- ---- ------------------------------

" Mayolo Juarez via DotNetMonster.com" < FO *** @ nospam.DotNetMonster.com>在消息中写道

news:25 ****************************** @ DotNetMonste r.com。 ..

Your using System.IO.Directory, correct?
Just a hunch, but the directory is probably named \\com1\tr\tr1, and that''s why it only copies the second way.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Mayolo Juarez via DotNetMonster.com" <fo***@nospam.DotNetMonster.com> wrote in message
news:25******************************@DotNetMonste r.com...
好的我需要复制一个目录示例:

copyfolder(\\ com1 \tr,d:\\\\,true)

如果我复制这个目录mi app不要复制,但如果我复制那个:

copyfolder(\\com1 \\\\tr1,d:\ df \\ \ n,真的)

复制其正确的内容,因为我无法通过第一种方式复制
目录的内容。

-
通过 http://www.dotnetmonster.com 发布消息
Ok i need to copy a directory example:

copyfolder(\\com1\tr,d:\df\res,true)

if i copy this directory mi app dont copy but if i copy that:

copyfolder(\\com1\tr\tr1,d:\df\res,true)

the copy its correct whats up because i cant copy de content of the
directory by the firts way.

--
Message posted via http://www.dotnetmonster.com


不,目录存在,但我不能复制,我试图在

a网络上复制共享文件夹,但是它的错误''当我在这里复制\\\\\\

函数复制正确的de目录但如果我复制主目录\\

com1 \\ut功能。不要复制的文件夹,说我"不正确

参数"为什么?我怎么能纠正这个。


的功能是:


fso = new FileSystemObject()


fso.CopyFolder(" \\com1\ut"," d:\ ly")在这种情况下,功能显示Non

更正参数


fso.CopyFolder(" \\com1\ut\ut"," d:\ ly")在这种情况下复制好内容

文件夹。


-

通过 http://www.dotnetmonster.com
No, the directory exist but i can''t copy, i''m try to copy shared folders on
a network but th bug it''s when i copy in this for \\com1\ut\ut the
function copy correct de directory but if i copy the principal directory \\
com1\ut the function don''t copy the folder and said me "Non Correct
parameters" why ? how can i correct that.

the functions are :

fso= new FileSystemObject()

fso.CopyFolder("\\com1\ut","d:\res") in this case the funtions show "Non
corrects parameters"

fso.CopyFolder("\\com1\ut\ut","d:\res") in this case copy good the content
folder .

--
Message posted via http://www.dotnetmonster.com


不,目录存在,但我不能复制,我是尝试在

a网络上复制共享文件夹,但是当我复制到\\\\\\

函数副本时,它就会出现错误正确的de目录,但如果我复制主目录\\

com1 \ ut功能不要复制文件夹,并说我非正确

参数"为什么?我怎么能纠正这个。


的功能是:


fso = new FileSystemObject()


fso.CopyFolder(" \\com1\ut"," d:\res",true)在这种情况下功能显示

" Non

纠正参数


fso.CopyFolder(" \\com1\ut\ut"," d:\ ly",true)in本案复制好

内容

文件夹。


-

留言通过< a rel =nofollowhref =http://www.dotnetmonster.comtarget =_ blank> http://www.dotnetmonster.com
No, the directory exist but i can''t copy, i''m try to copy shared folders on
a network but th bug it''s when i copy in this for \\com1\ut\ut the
function copy correct de directory but if i copy the principal directory \\
com1\ut the function don''t copy the folder and said me "Non Correct
parameters" why ? how can i correct that.

the functions are :

fso= new FileSystemObject()

fso.CopyFolder("\\com1\ut","d:\res",true) in this case the funtions show
"Non
corrects parameters"

fso.CopyFolder("\\com1\ut\ut","d:\res",true) in this case copy good the
content
folder .

--
Message posted via http://www.dotnetmonster.com


这篇关于.net中的FileSystemObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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