내 질문에 FileSystemWatcher 클래스를 사용하여 Excel 파일을 저장할 때 모니터링 할 때 FileSystemEventArgs가 반환됩니다 .Deleted 이유는 무엇입니까? .txt 형식의 파일을 모니터링 할 때 .ChangedFileSystemWatcher 클래스
3
A
답변
8
Excel에서 처음으로 임시 파일을 만들고 그곳에 정보를 쓰게되므로 원본 .xls 파일을 삭제하고 임시 파일의 이름을 바꾸는 것보다 훨씬 간단합니다.
Excel에서 저장 작업이 실패 할 경우 원본 파일이 손실되지 않도록 할 수 있습니다.
3
Excel에서보고있는 파일을 삭제하고 다시 만들 수있는 것 같습니다. 이를 경험적으로 증명하는 한 가지 방법은 파일을 실행하는 것을 감시 한 다음 메모장과 같은 다른 응용 프로그램에서 파일을 열고 저장하는 응용 프로그램을 사용하는 것입니다. 이 경우에만 Changed
이벤트가 트리거되는 경우 엑셀이므로 Deleted
이벤트가 트리거됩니다.
관련 문제
- 1. DeepZoom + FileSystemWatcher 클래스
- 2. FileSystemWatcher
- 3. FileSystemWatcher 문제
- 4. FileSystemWatcher 이벤트 트리거 문제
- 5. FileSystemWatcher IDE의 이벤트
- 6. C# FileSystemWatcher 잠금 폴더
- 7. Samba에서 잘못된 FileSystemWatcher 동작
- 8. HFS + 파일 시스템의 FileSystemWatcher
- 9. FileSystemWatcher 호출 중단 처리
- 10. FileSystemWatcher 이벤트를 어떻게 테스트합니까?
- 11. 네트워크 컴퓨터 설정에서 FileSystemWatcher
- 12. FileSystemWatcher OnOpened 이벤트
- 13. FileSystemWatcher 작업이 완료 되었습니까?
- 14. FileSystemWatcher 및 windows 7
- 15. .NET filesystemwatcher - 파일이나 디렉토리였습니까?
- 16. FileSystemWatcher, 이상한 응답
- 17. FileSystemWatcher 우선 순위
- 18. filesystemwatcher multiple files
- 19. 어떤 사용자가 FileSystemWatcher 이벤트를 일으켰습니까?
- 20. 가장 된 사용자로 실행중인 FileSystemWatcher
- 21. 대기중인 FileSystemWatcher 이벤트를 비우는 방법?
- 22. FileSystemWatcher - 대체 데이터 스트림 모니터링
- 23. FileSystemWatcher 변경된 이벤트가 변경되지 않았습니다.
- 24. 파일 스트림 열기를위한 FileSystemWatcher 트리거
- 25. 매핑 된 네트워크 드라이브의 FileSystemWatcher
- 26. FileSystemWatcher 객체를 오래 가지 않게하는 원인은 무엇입니까?
- 27. FileSystemWatcher 및 네트워크 연결이 끊어 졌습니까?
- 28. FileSystemWatcher - 파일이 닫힐 때를 결정하는 방법?
- 29. filesystemWatcher 이벤트 전에 버전을 저장하려면 어떻게해야합니까?
- 30. FileSystemWatcher 주위에 간단한 .NET 래퍼 서비스를 작성하십시오. 변경된 이벤트
나는 그것이 어떻게되는지 확인합니다. SysInternals의 무료 Process Monitor 소프트웨어를 사용하여 명확하게 볼 수 있습니다. –