473,372 Members | 1,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 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 4028

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcelo Rizzo | last post by:
I am trying to get the name of a file with a specific extension (tmw) from several different directories. The problem I am having is that the program stops working on the second pass with an run...
5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
3
by: Wayfarer | last post by:
Hi, I've got a freebie hosting mirror of my production personal website (sounds kinda grandiose, doesn't it?) at http://journeys.webhostme.com/. At the production website I was using...
3
by: Steve | last post by:
Hi all, FileSystemObject question... I'm trying to check if files exist or not, but the files are not sitting on the same server as our Intranet. Basically we have about 5000 photos in a...
2
by: Sean S - Perth, WA | last post by:
Hi all, If I create a FileSystemObject Object is it appropriate to reuse it to perform operations on different files/folders? Or should I create a new FileSystemObject Object for each file and...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
2
by: Luis Esteban Valencia | last post by:
I'm trying to write a little VB.NET script in an ASP.NET web page that will create folders, move files, etc... pretty much everything you can expect to do using the FileSystemObject library. Is...
1
by: G Gerard | last post by:
Hello I am using the FileSystemObject to copy files on a computer Dim MyObject as Object
3
by: nagmvs | last post by:
hello I have a problem with FileSystemObject in Vb Suppose i want to declare as Dim fs As New FileSystemObject, when i type New After that i can't see FileSystemObject in derived DropDownList. ...
12
lee123
by: lee123 | last post by:
why is this so hard to do. i have alot of books that have exaples of how to do these things but when i try the exaples they never work i have a previous post on "copying files" some of the other guys...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.