471,348 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

FileSystemObject in .net

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
Jul 21 '05 #1
10 3960

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...
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

Jul 21 '05 #2
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
Jul 21 '05 #3
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
Jul 21 '05 #4

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...
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

Nov 22 '05 #5
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
Nov 22 '05 #6
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
Nov 22 '05 #7
What is the name of the folder you are trying to copy?

\\com1\ut\ut ?

What is the exception being thrown when it doesn't work?

IOException ? What is the message ?

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Mayolo Juarez via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:5b******************************@DotNetMonste r.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

Nov 22 '05 #8
Im trying copy the directory \\com1\ut and the error that the function
return
myerror.source="Interop.Scripting"
myerror.message="The parameter is not correct"
and i believe that the type is System.ArgumentException

this all the information tha the function return to me

--
Message posted via http://www.dotnetmonster.com
Nov 22 '05 #9
I'm sorry that I can't help you. If the name of the directory is correct, it should work. Does it work in javascript in IE?

Try this in scripting:

<script language="jscript">
var fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CopyFolder("\\\\com1\\ut\\ut", "d:\\res", true);
fso = null;
</script>

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Mayolo Juarez via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:63******************************@DotNetMonste r.com...
Im trying copy the directory \\com1\ut and the error that the function
return
myerror.source="Interop.Scripting"
myerror.message="The parameter is not correct"
and i believe that the type is System.ArgumentException

this all the information tha the function return to me

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

Nov 22 '05 #10
Ok thanks only on detail i use this funtion in vb.net maybe its a bug in
the function

--
Message posted via http://www.dotnetmonster.com
Nov 22 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Marcelo Rizzo | last post: by
5 posts views Thread by John Dewbert | last post: by
2 posts views Thread by Sean S - Perth, WA | last post: by
2 posts views Thread by Luis Esteban Valencia | last post: by
1 post views Thread by G Gerard | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.