在运行时创建文件夹,并在exe在远程位置运行时从系统位置访问图像 [英] create afolder at run time and accessing the images from system location when exe run at remote location

查看:59
本文介绍了在运行时创建文件夹,并在exe在远程位置运行时从系统位置访问图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是我想在运行时创建一个新文件夹,并从该文件夹中获取图像,然后将过程图像保存到另一个文件夹中.
在这里,我认为使用创建新目录概念很有帮助

my problem i want to create a new folder at run time and geting images from that folder and after process images save into another folder.
here i think use create new directory concept helpfull

DirectoryInfo destinationDir = new DirectoryInfo("c:\\b");


像这样
任何示例..


like this
any example for this..

推荐答案

如果要在运行时创建文件夹,其中怎么有图像?
无论如何,这是在运行时创建目录的方法
If you are creating folder at runtime, how can there be images in that?
Anyways, here is how you can create a directory at runtime
IO.Directory.CreateDirectory("C:\\MyImages");


这就是您可以从该文件夹中获取所有jpg图像的方式.


And this is how you can get all jpg images from that folder.

DirectoryInfo di = new DirectoryInfo("C:\\MyImages");
FileInfo[] fi = di.GetFiles("*.jpg");


尝试解决这个问题.


Try to work out your problem with this.


这篇关于在运行时创建文件夹,并在exe在远程位置运行时从系统位置访问图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆