473,385 Members | 1,542 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.

Copy a file to new location when it opens C#.net

I need to copy files in pluged-in pen drive if the file is opened. Is there a way to do that in C#.net
Mar 1 '12 #1
2 1865
PsychoCoder
465 Expert Mod 256MB
You wont be able to move a file if it's opened by your application. If it's closed then you should be able to copy the file with File.Copy
Mar 1 '12 #2
Hi PsychoCoder,
I don't want to move the file. What I want is to copy the file to a specified location when the file opens. There must be some event occur when a file opens (Most probably win32.dll might have this)
Mar 7 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Paul | last post by:
Dear All, I want to use web form to upload my file and copy the file to another machine. I can upload the file, but when I copy the file(file.CopyTo(".....", true)) to another machine(map...
0
by: R.A. | last post by:
Hi Is there a way to specify the EventLog file location? The application I have is writing to its own event log file but I don't know how can I set the location where this file will be located....
1
by: Jim Heavey | last post by:
Hello, I have done some volunteer work for my club and develop a web site in ASP.Net. I have the code working fine and now I am ready to move the code up to their web hosting company. I have...
0
by: Grey | last post by:
I have a ASP.NET web application which is required to copy file from windows server to Novell Netware server. I have used impersonation to connect to Netware server. The application works fine when...
5
by: aiki727 via DotNetMonster.com | last post by:
Hello everyone, Where do I store a bitmap or jpeg that I am using for a forms background image when I deploy the application? Or do I link these files to the app during the deployment? Thanks...
0
by: Kirk | last post by:
I have created an application that copies images I select to two printer que's. The images are either AutoCAD plot files (.PLT) or scanned images (.TIF). My method works well for the PLT files on...
4
by: Bob Altman | last post by:
Hi all, When I create a new website (click on "Create: Website" from the start page), I'm prompted for the location of the project files, but VS 2005 always creates a SLN file under the Visual...
3
by: raddrummer | last post by:
I'm using Access to call Visio and generate organization charts (using Visio's Org Chart Wizard) and then us the SaveAsWeb method to save the file as a set of web pages. As long as my target is on...
2
by: ahmurad | last post by:
Dear Brothers, I am using a 'text file location' at my code to read the file contents- which is working fine in my local server. The web contents/php files and the specified txt file are at the...
1
by: alnino | last post by:
Hi, On a form I have a command button that allows a user to browse for a file (PDF, Word, etc…). This command button then stores a hyperlink to the file within an associated txtfield in the table....
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: 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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.