Change filename when file drops into folder
I'm new at c#. I want to be able to drag and drop some .MSG files i开发者_运维知识库nto a folder and I'd like to change the filenames uniquely. I've no idea what to do. Any ideas?
If the file name isn't unique, then it'll be pretty hard to drop it into the folder in the first place - but that's beside the point.
You can watch a folder using the FileSystemWatcher class. You can generate a unique name in a number of ways - something involving Guid.NewGuid()
will always work of course.
精彩评论