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

(c#) how do i disable the code from configuration file? (the xml.. the .config file)

hi all,

i have this program that will run and the result is based on the .config file.
how do i disable the code from the config file ?

for example...

i want some method to not functioning when i change the variable in the config file..

e.g:

my .exe file will copy and delete files at the same time..
how do i disable the copy function so that the .exe will only delete when i reun the exe file.

of course i can determine it in the .config file..


thanks..

if possible can reply asap!
Jun 21 '07 #1
3 1922
kenobewan
4,871 Expert 4TB
If I understand you correctly, delete the variable from the web.config and add it programmtically. If not please give a clearer explanation. Thank.
Jun 21 '07 #2
erm.. okay, let me give a clearer explanation...

- my .exe program will run to copy and delete files at the same time.

- it will copy from folder "a" to folder "b"

- and then delete some files from both folders

- the copy and delete depends on the variable which i can determine in the .config file

- how do make the .exe file "just delete and not copy" ?? which also means that i disable the copyFile codes from the source

- or is there any other way rather than disabling the copyFile code(which is the only way i`ve been thinking of) ??


- its actually a backup program which can copy from folder "a" to folder "b" and delete files at whichever folder depending on the days to be retained

- e.g: it will delete only files that are 5 days old. and that days are configurable in the .config file

- so how do i make the .exe program running without copying the file.. just deleting the file.. and i should do that in the .config file only..

- thanks for the help..

- p/s 1 more thing : i couldnt delete the folders in the folder.. sigh.. it keeps checking the "read only" attributes

- even after i unchecked it.. can anyony help?
Jun 22 '07 #3
kenobewan
4,871 Expert 4TB
I was thinking that there was a way to not use the web.config to delete files and do it programmatically, but this not you want. There is also deletefile. Anyone else?
Jun 22 '07 #4

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

Similar topics

2
by: kathy | last post by:
What Application Configuration File is? And when/where/how to use it? Any documents on that? MSDN has somrthings scatter everywhere - hard to follow. thanks,
0
by: runningdog | last post by:
HI, Sorry if this is a bit long winded I'm working on a suite of winapps that need to use two levels of configuration data; application level and solution level. I found a reference on MSDN...
1
by: Raymond Cheung | last post by:
How do I disable to show xml file content on web browser from across domain. I know we can have some sort of enbcription on the xml file content. I also know that we can use authentication to...
0
by: phillip | last post by:
This is interesting, I have attached my web.config file and the exception I have been logging. I created a library which provide data access to a database and a control system. The library is...
3
by: Nuno | last post by:
At first, I was trying to encrypt ConnectionStrings in my app.config and still be able to modify my datasets. So, i had to modify the Settings.Designer.cs file to handle the decryption aspect in...
3
by: John K | last post by:
I am trying to eliminate the capability of displaying the details of a web service by disabling WSDL generation in the web.config file. I have made the following changes to the web.config: ...
10
by: Gary Jefferson | last post by:
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger =...
1
by: Piotrekk | last post by:
Hi I have a strange problem. Here is some input data before I describe the problem. 1. RemoteClass (Mathematica) is compiled into dll and put to GAC 2. Server remoting configuration is done by...
0
by: jasonburton | last post by:
I have an application that has been ported over the years through multiple development environments and has tens of thousands of customer installs. Currently, I'm trying to port from it Visual...
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: 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
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,...

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.