473,385 Members | 1,324 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,385 software developers and data experts.

File.Copy() to admin share

I perform

File.Copy("\\machine1\c$\dir1\file1.txt","\\machin e2\c$\dir1\file1.txt",true)

file1.txt shows up on machine2 with the "Read Only" attribute set

Does anyone know how to prevent this from happening?
Nov 17 '05 #1
1 3057
Perhaps you could just change the read-only attribute as soon as it is written.

"John Grandy" wrote:
I perform

File.Copy("\\machine1\c$\dir1\file1.txt","\\machin e2\c$\dir1\file1.txt",true)

file1.txt shows up on machine2 with the "Read Only" attribute set

Does anyone know how to prevent this from happening?

Nov 17 '05 #2

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

Similar topics

2
by: Mike MacSween | last post by:
I'm not talking Access Users & Groups, I may or may not implement that. Even if I do file/folder rights still need to be managed. I've searched the archives and read the many postings. The basic...
0
by: PRM | last post by:
Hi I am sharing a network drive, by using the following code (C# Code using ASP.net /********************************************************************************** public void ShareMap(string...
0
by: Praveen Naregal | last post by:
Hi, I am trying to copy a file from a network file share. The program is running under a local user account. The same local user is present in both the machines. The local user has full control...
12
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new...
0
by: PRM | last post by:
Hi , I am sharing a network drive, by using the following code (C# Code using ASP.net) /**********************************************************************************/ public void...
2
by: Stu | last post by:
Using IIs 6.0 on a Server 2003 box, and using ASP.NET I'm trying to do the following code snippit... Dim NewName As String = "\\network_share_path\edit_me.ppt" Dim PubName As String =...
10
by: Atley | last post by:
I am trying to make sure that an MDB is not in use and then delete it. If it is in use, I want to automatically disconnect all the users and then delete the file. Any suggestions are welcome.
4
by: ed | last post by:
Hi, how do i check if other applications is already connected to an access database (.mdb file)? Let's say I have an application that opens an mdb file, for example - test.mdb. Then I opened another...
2
by: AdrianJMartin | last post by:
Hi all, I just written a app that attemps to copy a user selected file to a bunch of users machines. Trouble is that when call System.IO.File.Copy( src , dest , true ) i get a Unauthorised...
2
by: beary | last post by:
Hello everyone, I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here. I'm in way over my head with file permissions. The directory and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.