473,399 Members | 3,656 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,399 software developers and data experts.

What am I doing wrong??

Here is what I am trying:

My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)
MessageBox.Show("Done Resetting Application Data, Press OK to
Continue and reset Local Settings data", "Backup in progress...",
MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Local Settings", _
"C:\Documents and Settings\" & Environment.UserName & "\Local Settings
\Application Data\Adobe", True)
MessageBox.Show("Done Resetting Local Settings data, Press OK
to Continue.", "Backup in progress...", MessageBoxButtons.OK,
MessageBoxIcon.Information)

I get the error that: \\server\all\sets\Application Data is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe

Also, will this work like this, one statement after another to do two
things?

thanks
Sep 18 '08 #1
4 862
But yoru code refers to \\server\all\sets\!!!!!PREFS\Application Data.

"Jason" <pa*****@excite.comwrote in message
news:3d**********************************@n33g2000 pri.googlegroups.com...
Here is what I am trying:

My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)

<Snip/>

I get the error that: \\server\all\sets\Application Data is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe
Sep 18 '08 #2
It appears that "\\server\all\sets\Application Data" is a folder. The
message is probably saying something like "File does not exist :
\\server\all\sets\Application Data, which is correct, as there is no such
file.

You can't use FileSystem.CopyFile to copy a folder - use CopyDirectory
instead.

Extending statements over multiple lines works, but can be avoided by
setting a variable to the folder/file names first and using the variable
instead of a literal in the statement. This makes your code much easier to
develop and test. You can alsways get rid of the extra variables after
everything is working OK.

"Jason" <pa*****@excite.comwrote in message
news:3d**********************************@n33g2000 pri.googlegroups.com...
Here is what I am trying:

My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)
MessageBox.Show("Done Resetting Application Data, Press OK to
Continue and reset Local Settings data", "Backup in progress...",
MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Local Settings", _
"C:\Documents and Settings\" & Environment.UserName & "\Local Settings
\Application Data\Adobe", True)
MessageBox.Show("Done Resetting Local Settings data, Press OK
to Continue.", "Backup in progress...", MessageBoxButtons.OK,
MessageBoxIcon.Information)

I get the error that: \\server\all\sets\Application Data is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe

Also, will this work like this, one statement after another to do two
things?

thanks
Sep 18 '08 #3
What?

On Sep 18, 7:01*pm, "Family Tree Mike"
<FamilyTreeM...@ThisOldHouse.comwrote:
But yoru code refers to \\server\all\sets\!!!!!PREFS\Application Data.

"Jason" <paul...@excite.comwrote in message

news:3d**********************************@n33g2000 pri.googlegroups.com...
Here is what I am trying:
My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)
<Snip/>
I get the error that: \\server\all\sets\Application Data *is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe
Sep 18 '08 #4
The code in your message has extra stuff "!!!!!PREFS" in the path. I'm
trying to
clarify whether you pasted wrong, or whether you overlooked the obvious.

"Jason" <pa*****@excite.comwrote in message
news:a7**********************************@m44g2000 hsc.googlegroups.com...
What?

On Sep 18, 7:01 pm, "Family Tree Mike"
<FamilyTreeM...@ThisOldHouse.comwrote:
But yoru code refers to \\server\all\sets\!!!!!PREFS\Application Data.

"Jason" <paul...@excite.comwrote in message

news:3d**********************************@n33g2000 pri.googlegroups.com...
Here is what I am trying:
My.Computer.FileSystem.CopyFile("\\server\all\sets \!!!!!PREFS
\Application Data", _
"C:\Documents and Settings\" & Environment.UserName & "\Application
Data\Adobe", True)
<Snip/>
I get the error that: \\server\all\sets\Application Data is not
found, but it is there, and inside that folder I want to copy a folder
to c:\doc and set\user\application data\adobe
Sep 19 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
11
by: Alfonso Morra | last post by:
Hi, I am at the end of my tether now - after spending several days trying to figure how to do this. I have finally written a simple "proof of concept" program to test serializing a structure...
46
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
2
by: Aaron Ackerman | last post by:
I cannot a row to this bound DataGrid to SAVE MY LIFE! I have tried everything and I am at a loss. The using goes into add mode with the add button adds his data then updates with the update...
16
by: Ajay | last post by:
Hi all, i want to know when i create a class.what all it contains.I know the following things are there by default if i do not declare them by myself.Please tell the other things that are left. ...
8
by: watkinsdev | last post by:
Hi, I have created a mesh class in visual studio 6.0 c++. I can create a device, render objects and can edit the objects by for instancnce selecting a cluster of vertices and processing the...
0
by: shapper | last post by:
Hello, I am creating a class with a control. I compiled the class and used it on an Asp.Net 2.0 web site page. I can see the begin and end tags of my control (<oland </ol>) but somehow the...
10
by: DavidSeck.com | last post by:
Hi, I am working with the Facebook API right now, an I have kind of a problem, but I don't know what I am doing wrong. So I have a few arrays, f.ex.: User albums: array(2) {
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.