完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在寻找一种让程序从当前目录中拉出文件的方法。
到目前为止,我必须设置一个带有常量的变量,如.//veefiles /然后我可以在整个程序中调用这个变量。 但是,如果我将文件夹veefiles移动到桌面,我必须将变量设置为新位置。 有没有办法设置程序从当前目录中提取文件。 我知道,例如,除非在PHP中指定,我只能使用/file.vxe,文件将从目录运行。 如果我需要关闭一个杠杆,我将使用./file.vxe或root ../file.vxe。 正如我所说这是一个php的例子,在VEE中有类似的东西吗?谢谢 以上来自于谷歌翻译 以下为原文 I am looking of a way to have the program pull files from the current directory in with is located it. So far i have to set up a variable with a constant like .//veefiles/ then i can call this variable all over the program. However if i move the folder veefiles to the desktop now i have to go and set the variable to the new location. Is there any way to set up the program to pull files from the current directory. I know for example unless specified in PHP i can just use /file.vxe and the files will run from the directory. If i need to go down one lever i will go something like ./file.vxe or to root ../file.vxe . As i said this is a php example, is there something similar in VEE? Thank you |
|
相关推荐
3个回答
|
|
我不确定这是否会完全回答你的问题,但是这段代码允许你获取当前目录(VEE正在运行的地方)System.IO.Directory.GetCurrentDirectory();然后如果你想上升一个级别
,使用此codeSystem.IO.Directory.GetParent(path).ToString();制作2个公式,第一个公式类型在上面的第一行代码中。 上面第二行代码中的第二个公式类型(路径为输入)。 将第一个公式的输出提供给第二个公式的输入。或者你可以从系统中获取它们 - > DirectoryIt还有其他目录功能。希望这个帮助。 以上来自于谷歌翻译 以下为原文 I'm not sure if this will answer your question completely, but this code allows you to get the current directory (where VEE is running off) System.IO.Directory.GetCurrentDirectory( ); And then if you want to go up one level, use this code System.IO.Directory.GetParent(path).ToString(); Make 2 formulas, first formula type in the first line of code above. Second formula type in the second line of code above (with path as input). Feed the output of first formula to the input of the second formula. Or you can just get them from System -> Directory It has other directory function as well.. Hope this help. |
|
|
|
我想我需要多加注意。
你纠正GET当前目录将拉我需要的东西。 我有这样的印象,它将拉动女巫VEE 9.2应用程序运行的目录,女巫没有任何感觉,它会拉它。 但是,谢谢你完成了这项工作。 以上来自于谷歌翻译 以下为原文 i think i need to pay more attention. ur correct the GET current Directory will pull what i need. I had the impression that it will pull the directory in witch VEE 9.2 application is running from, witch made no sens on y it would pull that. But thanks that did the job. |
|
|
|
我怀疑VEE需要一个参考点来拉一个目录,所以也可能是程序运行的目录....否则它将需要目录的变量。然后,有点.NET函数可能会做的伎俩,
但我还没有探索过任何一个。 以上来自于谷歌翻译 以下为原文 I suspect that VEE needs a reference point to pull a directory, so might as well be the directory where the program runs.... Otherwise it'll require variables for directory. Then again, there are dot NET functions might do the trick, but I haven't explore any of that yet. |
|
|
|
只有小组成员才能发言,加入小组>>
1234 浏览 0 评论
2352 浏览 1 评论
2163 浏览 1 评论
2028 浏览 5 评论
2912 浏览 3 评论
978浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
711浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
811浏览 0评论
1236浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-27 23:56 , Processed in 1.450042 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号