폴더의 모든 파일을 삭제하는 방법은 무엇입니까?폴더에는 폴더가 없고 여러 파일이 있습니다.
JSL을 사용하여 이러한 파일을 어떻게 삭제할 수 있습니까?
이 폴더는 다른 수준에서 점유하고 있으므로 폴더를 삭제하여 얻을 수 없습니다.
rd1=Delete Directory(dir);rc1=Create Directory(dir);
감사!
스크립팅창Re: 폴더 안의 모든 파일 삭제는 어떻게 하나요?나를 위해 디렉토리는 파일이 있어도 삭제됩니다. 파일 중 일부가 아직 사용 중이신가요?
Names Default To Here(1);
dir_path = "$TEMP\test\";
If(!Directory Exists(dir_path),
Create Directory(dir_path);
new_file = Save Text File(dir_path || "DeleteMe.txt", "The quick brown fox");
new_file = Save Text File(dir_path || "DeleteMe2.txt", "The quick brown fox");
);
wait(1);
Show(Directory Exists(dir_path));
Show(Files In Directory(dir_path));
Show(File Exists(new_file));
Delete Directory(dir_path);
wait(1);
Show(File Exists(new_file));
Show(Directory Exists(dir_path));
Re: 폴더 안의 모든 파일 삭제는 어떻게 하나요?파일만 삭제하려면 다음을 수정하세요. @jthi 그렇게 하는 코드
Names Default To Here( 1 );
dir_path = "$TEMP\test\";
If( !Directory Exists( dir_path ),
Create Directory( dir_path );
new_file = Save Text File(
dir_path || "DeleteMe.txt",
"The quick brown fox"
);
new_file = Save Text File(
dir_path || "DeleteMe2.txt",
"The quick brown fox"
);
);
Wait( 1 );
// Get the files in the folder
the_Files = Files In Directory( dir_path );
For Each( {file}, the_files, rc = Delete File( dir_path || file ) );
Show( Files In Directory( dir_path ) );Re: 폴더 안의 모든 파일 삭제는 어떻게 하나요?감사!
더 이상 Windows 7을 사용할 수 없습니다.
반드시 JMP 16을 사용하십시오.
각각에 대한 강력한()
For Each( {file}, the_files, rc = Delete File( dir_path || file ) );