473,563 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Moving files to a shared folder

Hi,

I am writing some C# code that moves files from a source folder to a
target folder on the same machine. However, if the target folder is a
shared folder, using the File.MoveTo method alone does not cause the
files to be shared as well. How can I make the moved files inherit the
parent folder's shared setting? I have looked into the
System.Security .Permissions.Fi leIOPermission class but it doesn't seem
to do what I'm looking for. I'm pretty new to .NET development so any
help would be appreciated.
Jul 21 '05 #1
1 2401
Hubert Wong wrote:
Hi,

I am writing some C# code that moves files from a source folder to a
target folder on the same machine. However, if the target folder is a
shared folder, using the File.MoveTo method alone does not cause the
files to be shared as well. How can I make the moved files inherit the
parent folder's shared setting? I have looked into the
System.Security .Permissions.Fi leIOPermission class but it doesn't seem
to do what I'm looking for. I'm pretty new to .NET development so any
help would be appreciated.


Never mind, I figured it out using the libary here:
http://www.codeproject.com/dotnet/NTSecurityNET.asp
Jul 21 '05 #2

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

Similar topics

4
5489
by: Stephen Ghelerter | last post by:
I am moving a web site with a MySql database to another server. Can I create a database on the new server with the same name and then move the tables there, or is life not that simple? Or can I create tables with no data and then replace them with the files from the other server? I know I can export them as text files and them import them,...
6
1901
by: Tim | last post by:
I am in the process of moving a site from one hosting company to another. This site is fairly large, with hundreds of asp files, each with multiple "include" statements. The new host has a different webspace folder structure for it's clients than the old host. At the moment, this is forcing me to have to append all the paths for all the...
2
3159
by: Dan Baker | last post by:
I'm relatively new to the .cs world. I would like to have some "shared" .cs files, which several solutions can use. I don't want to place these in a ..dll, I simply want them included into various applications. I have tried several methods, but most have failed. The most obvious way (I thought) was to place the .cs files in a parent folder...
9
1987
by: TPS | last post by:
I have a virtual directory where all posted files are stored. The ASP app does not have rights to the share on the other server where the vir dir resides. What is the best way to give the asp app the rights to post files to the vir dir. Thanks
5
1567
by: Jim Heavey | last post by:
Hello, I am trying to figure out how to put my application onto the server. I am deploying to a Windows 2000 Server When I bring up Internet Services Manager and navigate to the Default Web site and I right click on the default web site folder, do I choose "New Site" or "New Vitural Directory" I am guessing that I would choose "Virtual...
1
266
by: Hubert Wong | last post by:
Hi, I am writing some C# code that moves files from a source folder to a target folder on the same machine. However, if the target folder is a shared folder, using the File.MoveTo method alone does not cause the files to be shared as well. How can I make the moved files inherit the parent folder's shared setting? I have looked into the...
6
3186
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to me like there were performance issues at the time. How about the different types? The MS docs I would expect Access to differentiate and handle...
2
1430
by: ogo796 | last post by:
hi friends i am having a problem with creating folder within a directory. $Tdate = date('dFY'); // first directory. $_POST)) { mkdir($Tdir."/".$Tdate."/".$_POST); echo"the directory ".$Tdir."/".$Tdate."/".$_POST." has been created <br/>"; if(move_uploaded_file($_FILES,$destfile))
1
3135
by: Claire | last post by:
Ive written a small string resource building utility that I send out to our translators. I have a setup project for each language we support, which picks out a group of 12 english resx files plus their paired "foreign" resx for that language only and installs those resource files in a subdirectory somewhere. I'm trying to create a setup...
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7945
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.