我试图在创建日记和 pdf 后将它们保存到文件夹中。
首先,我使用 pick directory 来获取我要分析的文件。 完成后,文件将保存到该目录中。
但是,我希望他们将日期保存到一个文件夹中。
这是我试过的代码:
Main Menu( "Minimize All" );
path = Pick Directory( "Select a directory" );
Set Default Directory( path );
files = Files In Directory( path );
output = Create Directory( path || Substitute( MDYHMS( Today() ), "/", "-", ":", "." ) || "/" );
It then goes into a for loop to create the graphs
At the end of the for loop you have
jrn <<
SaveJournal( path || files[i] || ".jrn" );
Current Journal() << close window();
report << SavePDF( path || files[i] || ".pdf" );
report << close window();
dt << close window;
org << close window;
对于保存的部分,我试过路径 ||输出|| ...而且我也试过添加“/”——这些似乎都不起作用。
现在它保存到路径的目录中,但我希望它更进一步进入输出
我认为问题可能是您的“输出”变量的分配没有产生您期望的结果。 尝试这个:
output = path||substitute(MDYHMs(Today()), "/", "-", ":", ".")||"/";
创建目录(输出);
然后,当你去保存你的报告时,以下应该对你有用:
报告 << SavePDF(输出 || 文件[i] || “.pdf”);