sorry theres a typo there. it should be
string extension = sFiles.Substring(sFile.LastIndexOf("."));
forgot the "s" in "sFiles"... but that should have been obvious.
sorry theres a typo there. it should be
string extension = sFiles.Substring(sFile.LastIndexOf("."));
forgot the "s" in "sFiles"... but that should have been obvious.
string sourceFolder = @"put your first folder here";
string destFolder = @"put your 2nd folder here path here";
private void button1_Click(object sender, EventArgs e)
{
int filecount = 0;
foreach (string sfiles in Directory.GetFiles(sourceFolder))
{
string extension = sFile.Substring(sFile.LastIndexOf("."));
if (extension == ".jpg" || extension == ".JPG")
{
File.Move(sfiles, destFolder + sFile.Substring(sFile.LastIndexOf(@"\")));
}
}
}
Something like that should get it.
File.Move(SourcePath, DestinationPath);
that's it.
um... What?
the Microsoft office assistant can be loaded as a com object to achieve that effect. but then you have to assume that all users of the app are using a version of Microsoft office.
well I can tell you Google didn't write it. they based their entire empire on something they paid for with petty pocket change.
Its a great system, they have evolved the original algorithm a bit. It is unclear to me why you would post this question in the C# forum. if you were wanting to create your own web search system there is an asp.net daniweb forum. if you are interested in setting up a windows forms search system there is a keyword scoring system that can be used to do a pretty good search.
http://social.msdn.microsoft.com/forums/en-US/winforms/thread/68cc6e07-295d-4df2-b74f-0421a6378b47/
This information seems hand, for files, but just for sake of working code, there is a codeproject example that has a demo app with source code of how to drag a url shortcut to the desktop from you application found here
http://www.codeproject.com/KB/cs/draginternetshortcut.aspx
I wish I had more, I have been putting off working this out for a feature in an app I'm working on myself.
best of luck.