Delete a file cannot be deleted

本文讲述了在使用第三方软件转换视频文件时遇到的问题及解决方案。作者在尝试删除一个零大小的文件时遭遇困难,最终通过关闭相关进程成功删除。文章还探讨了可能引发此问题的原因。
Hello every one, I'm happy to here and ask you a question, in other words, let's solve a pazzle.
I downloaded some TV-Shows from the Internet, and I want to convert them to AVI files because that could save a lot of space of hard-disk. But during using the third-party software WinMPG Video Convert, an error occured and showed a message to me telling that the file I selected had no video or audio stream, but it is impossible, because the file can be played normally. Then, I found this software built a zero-size file on my hard-disk, and while I tried to delete this file, Windows had no response soon. Why? I cannot explain that, but it's interesting and unbelievable that when I tried to write some C# codes to delete this file automatily, an exception occured when I debugged it, the message showed me that the file I tried to delete was locked by another process. What? Which one? I don't know. I closed my application and tried to delete again. I'm really hope that it can success, but it does not, the difference is that Windows responsed and showed me the same message. Then, I opened the taskmgr and found a process named conime.exe(calm down man, it does not a virus, on the contrary, it is a normal process that called by my application, because my application is an Console Application, it of course will call the Console IME), I killed it and tried to delete the file once again. SUCCESS! What did my application do? Could you explain the pazzle for me? Thanks lot.
Best Regards,
Wei CHEN
there is a file,use c write a System Requirements: A. To make the program as user-friendly as possible, use the following menu to start. 1. Import grades for a course 2. Delete a course 3. Calculate GPA 4. Export file with GPA 5. Quit User will choose the functions using the index number: 1: ask user to import a file from which the grades will be added to students.txt. a) The program should ask the user to input the course name before input the file name. It is assumed that the length of course name is less than 20. b) If the course name inputted by user exists in students.txt, gives user a warning. User can choose to replace the old grades with new or not. If user choose not to replace, go back to main menu. c) If the course name does not exist in students.txt, ask the user to give the file name to import. d) If it is found that a student ID in this imported file cannot be found in the students.txt, do not import and give the warning. Each ID contains 10 digits. It is assumed that each file has been sorted according to ID in ascending order before it is imported. 2: ask user to input the course name to delete. If the course name does not exist in students.txt, gives a warning. 3: the system will calculate GPA for each student in students.txt and put the GPA in the file too. Keep two decimal points in GPA. 4: when user has this choice, the system will display a sub-menu. 1. Sorted in ID (ascending) 2. Sorted in GPA (descending) 3. Back to main menu In this sub-menu, if user chooses 1 or 2, the system will ask user to input a file name to export to. If user chooses 3, system goes back to main menu. 5: Quit the system.
07-16
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值