Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当使用;文件mkdir";在TCL中,我得到一个错误,即文件夹不存在,但这就是我想要创建它的原因。。_Tcl_Mkdir - Fatal编程技术网

当使用;文件mkdir";在TCL中,我得到一个错误,即文件夹不存在,但这就是我想要创建它的原因。。

当使用;文件mkdir";在TCL中,我得到一个错误,即文件夹不存在,但这就是我想要创建它的原因。。,tcl,mkdir,Tcl,Mkdir,在Windows 7计算机上的TCL8.5.9中创建目录时,我遇到了一点问题 set CurrentDir [ file dirname $GUI_DB_path] set ImageFolderPath [ file join $CurrentDir "DeflectionPlots" ] # Always try to delete the Folder no matter if it exists or not file delete -force $I

在Windows 7计算机上的TCL8.5.9中创建目录时,我遇到了一点问题

set CurrentDir          [ file dirname $GUI_DB_path]
set ImageFolderPath     [ file join $CurrentDir "DeflectionPlots" ]
# Always try to delete the Folder no matter if it exists or not
file delete -force      $ImageFolderPath

# sometimes the following throws an error. Do not understand why.
# Create a clean and empty ImageFolder
file mkdir              $ImageFolderPath
有时,但并非总是会出现错误:

无法创建目录….$ImageFolderPath。。。。。没有这样的文件或目录

这就是为什么我想创造它。在不做任何更改的情况下再次运行代码将导致按需要创建目录。这是什么原因造成的?我如何解决该问题?我可以捕捉到错误,但仍然无法创建文件夹。

Windows文件操作(或其内部锁定)通常很慢

我遇到了像你这样的问题,删除/新文件/重命名会带来麻烦 有一段时间,然后我得到了错误,因为文件在某种程度上 操作系统不稳定

您可以在删除和创建之间添加一个短睡眠,然后 应在Windows上解决此问题

set ::img_create_sleep 0
after 200 [list set ::img_create_sleep 1]
vwait ::img_create_sleep
Windows文件操作(或其内部锁定)通常很慢

我遇到了像你这样的问题,删除/新文件/重命名会带来麻烦 有一段时间,然后我得到了错误,因为文件在某种程度上 操作系统不稳定

您可以在删除和创建之间添加一个短睡眠,然后 应在Windows上解决此问题

set ::img_create_sleep 0
after 200 [list set ::img_create_sleep 1]
vwait ::img_create_sleep

在创建
ImageFolderPath
目录时,您是否有
CurrentDir
存在的舒尔?是的,我是舒尔。您是否总是从同一工作目录执行脚本(例如,使用
Tcsh
)?
CurrentDir
是绝对路径片段吗?确保它在任何时候都是绝对的,例如通过写入
set-ImageFolderPath[file normalize[file join$CurrentDir“deformationplots”]
我会尝试一些“puts调试”:
puts“CurrentDir=$CurrentDir\nImageFolderPath=$ImageFolderPath\npwd=[pwd]\n[glob-directory$CurrentDir*]”来了解Tcl“看到了什么”我检查路径的次数是绝对的。不过,我现在确实使用了Calvin先生建议的规范化选项。错误尚未再次显示upp。您是否认为在创建
ImageFolderPath
目录时存在
CurrentDir
?是的,我是舒尔。您是否总是从同一工作目录执行脚本(例如,使用
Tcsh
)?
CurrentDir
是绝对路径片段吗?确保它在任何时候都是绝对的,例如通过写入
set-ImageFolderPath[file normalize[file join$CurrentDir“deformationplots”]
我会尝试一些“puts调试”:
puts“CurrentDir=$CurrentDir\nImageFolderPath=$ImageFolderPath\npwd=[pwd]\n[glob-directory$CurrentDir*]”来了解Tcl“看到了什么”我检查路径的次数是绝对的。不过,我现在确实使用了Calvin先生建议的规范化选项。错误尚未再次显示upp。此半状态通常是由于防病毒软件扫描活动造成的,因为这需要一段时间,并且是在特权级别下完成的,该权限级别使其对用户代码不可见,而不是通过其对文件操作的奇怪影响。此半状态通常是由于防病毒软件扫描活动造成的,因为这需要一段时间,并且是在特权级别完成的,这使得用户代码无法看到它,而不是通过它对文件操作的奇怪影响。