目錄中的文件使用 JMP 17 時,如果檔案名稱前導數字或包含數字,「目錄中的檔案」腳本命令似乎不起作用。除非所有檔案名稱都不含數字,否則「監視」視窗會回傳各種錯誤。
folderPath =“C:\Users\first.last\documents”;
fd = 目錄中的檔案(folderPath,1,1);
w = 觀看(fd);
其他版本中修復了這個問題嗎?有什麼建議嗎?
自動化和腳本回覆:目錄中的文件我沒有遇到這樣的問題(雖然使用 JMP18 函數)。例如,使用 Watch() 而不是 Show() 的具體原因是什麼?
Names Default To Here(1);
folderPath = "$DOCUMENTS";
fd = Files In Directory(folderPath, 1, 1);
show(fd);

回覆:目錄中的文件我剛剛在 Windows11 下運行的 JMP 17.2 中運行了以下範例,檔案名稱以數字開頭的檔案沒有任何問題
names default to here(1);
folderPath = "C:\Users\Jim\Documents\Discussion Groups";
fd = Files In Directory( folderPath,1,1 );
{"0123mike_s.xlsx", "34Yass_Sample_Row6.xlsx", "Chris_Liu", "ConfidenceOwl94",
"mann", "Yass_Sample_Row5.xlsx"}
回覆:目錄中的文件更正。檔案名稱中的前導零(例如「05 Messages.xls」)似乎會導致監視視窗傳回的內容出現問題。
回覆:目錄中的文件這似乎是“監視”視窗顯示變數的方式出了問題。變數“fs”定義正確。直到我新增了「05 Messages.xls」檔案後才出現問題。我建議避免使用 Watch() 函數。據我所知,Show() 函數在任何情況下都能正常運作。
Names Default to Here( 1 );
dir = "$DOCUMENTS\JMP Scripts\zero test\";
fs = Files in Directory( dir, 1, 1 );
w = Watch( fs );
Show( fs );
//fs = {"0 is smaller than 1", "00five-oh.txt", "0meansinfinity.txt", "Hello World.txt"};

Names Default to Here( 1 );
dir = "$DOCUMENTS\JMP Scripts\zero test\";
fs = Files in Directory( dir, 1, 1 );
w = Watch( fs );
Show( fs );
//fs = {"0 is smaller than 1", "00five-oh.txt", "05 Messages.xls", "0meansinfinity.txt", "Hello World.txt"};

回覆:目錄中的文件哦,Watch() 在 JMP 18.0.1 中的行為也是一樣。我在 17.2 中運行了上面的測試。
回覆:目錄中的文件我更改了檔案名,其中一個檔案以“01 23mike_s.xlsx”開頭。
在 JMP 17.2 中運行,我的觀察視窗沒有任何問題

回覆:目錄中的文件除了在調試器的 GUI 中監視之外,還有一個手錶()命令:
我剛剛用 JMP v18.2.1 檢查了一些有 0 的檔案:

似乎不是 0,而是換行符導致了問題 - 在添加另一個文件之後:
