FileSystemObject in .net

  • Thread starter Thread starter Mayolo Juarez via DotNetMonster.com
  • Start date Start date
M

Mayolo Juarez via 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.
 
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.
 
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 .
 
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 .
 
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 ?
 
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
 
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>
 
Ok thanks only on detail i use this funtion in vb.net maybe its a bug in
the function
 
Back
Top