我試圖在創建日記和 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”);