|
octapuslabs wrote: an error a bug or something which crashes. Well, since we cannot see your screen, we cannot guess which, or what any of them might say. Please provide all the information relating to your problem, including the full details of the error, and the point in your code where it occurs.
|
|
|
|
|
System.IO.DirectoryNotFoundException
{"Could not find a part of the path 'd:\\test\\130123094607-kevin-durant-dunk-lamar-odom-012313.1200x672.jpg'."}
This happens when we have for example to copy c:\test to d:\test and the d:\ doesn't have the folder.If I create the folder manually the error disappears but the thing is I want the folder to be created if it doesn't exist and if it does exist to overwrite every file in it.
Thank you again for your time.
|
|
|
|
|
Then you need first to test if the directory exists, and if not then create it. Similarly when creating files, if they exist in the folder you need to ensure you use a create option that will force it to a new file.
|
|
|
|
|
Yup I thought of that creating first the directory and then copying files but the thing I can t do both.I m having some problem probably in code which I hope I ll find it slowly.The problem is that I can t copy the files when creating the new folder only if it s already there.Thank you again sir.
|
|
|
|
|
It's a two step process. Check to see if the directory exists that you want to copy into and then do the copy. That's what you have to do if you want to stay in the .NET world (of course, you could always spin up a Process and run an xcopy to do the requisite copy).
|
|
|
|
|
Yup I m new and I know net is great.I ll find it slowly.
|
|
|
|
|
Okay, you can take advantage of the fact that Directory.CreateDirectory only creates a directory if it doesn't exist so you could do the following:
private void CopyFiles(string sourceDirectory, string targetDirectory)
{
Directory.CreateDirectory(targetDirectory);
string[] files = Directory.GetFiles(sourceDirectory, "*.*", SearchOption.AllDirectories);
foreach (string file in files)
{
string targetFile = Path.Combine(targetDirectory, file.Replace(sourceDirectory, string.Empty));
File.Copy(file, targetFile);
}
} I've just typed this into the editor, so you might need to fix a syntax mistake or two, but this should roughly do what you're trying to accomplish.
|
|
|
|
|
Thank you sir a lot .I ll try in next days and I ll tell you result.
|
|
|
|
|
How integrate payment gate away in a website
like 'e-commerce website'. After buying payment will be done.
|
|
|
|
|
Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.
Only get such code from reputable card transaction service companies - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Pick a provider you want to use and follow their integration documentation.
|
|
|
|
|
I used paypal in my site.Safe they give you the code and if you are certified most people will trust you and your site.Also it gave me some prestige and more visits when I put the paypal verified icon n my site.
|
|
|
|
|
I need help but i want custom menustrip for select example theme black or devexpress on my c# tool
|
|
|
|
|
And?
What have you tried?
Where are you stuck?
What help do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Did you look it in the documentation? If they provide a license plan then surely they would provide an option to customize the controls.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I want to create a windows application in C#, in which I want to write some Text in textbox and click on a button. Then it would provide Audio of my text.
How can I do it?
|
|
|
|
|
|
|
You could have found the answer to this quite easily had you bothered to Google for it.
Google results for "C# text to speech example[^]"
|
|
|
|
|
|
Depends on the framework also, please read the above answers. Microsoft.Speech can be used, but if you are using .NET framework, then System.Speech [^] is what you are looking for. It includes APIs for text-to-speech (audio) code and you can use it to create your own application.
I have written an article for that also, An app that reads out text for you[^]. This article discusses a few things that help you in creating a sample application that works as a Text-to-speech converter.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
|
Hi
I want when user enter data in textbox and press 'Enter' ,change focus to another textbox.
It works but sounds like "Beep"!!!!
private void txtBinNumberInput_KeyDown(object sender, KeyEventArgs e)
{
if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
{
this.SelectNextControl((Control)sender, true, true, true, true);
I need remove sound...
|
|
|
|
|
Don't.
ENTER in a form is used to mean "Finished" or "Submit" and users are very used to this behaviour. Subverting it to fit a single use case is likely to confuse and annoy users rather than help them. Use TAB instead, which already does just that.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
In DataBase's forms when you press Enter focous will change...
|
|
|
|