开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜