.txt files not opening
So I've made a python script which basically just created .txt files. And nothing happened, my program worked and suddenly today I cant open txt files because it says Windows cant find the file. But if I open with something like Visual Studio Code, it works. And yes in the settings the default program for .txt files is Notebook
Windows for business | Windows Client for IT Pros | User experience | Other
-
MotoX80 • 36,416 Reputation points
2024-01-19T14:28:44.9066667+00:00 Without being able to see your screen and what you are doing, I would think that a probable cause would be that you've got a hex character in the file name. Open a command prompt and run a "dir" command on the directory. Compare that with the names that Windows explorer sees. How are you trying to open these files? Does a command prompt "type" command display the file contents.?
-
Sakite Sakite • 0 Reputation points
2024-01-19T14:47:44.2533333+00:00 Well its for sure not a hex character. Because I cant open ANY text files, not only the ones I create
-
Sakite Sakite • 0 Reputation points
2024-01-19T14:54:54.3866667+00:00 This is the error and it happens for all .txt files.
-
Sakite Sakite • 0 Reputation points
2024-01-19T14:56:20.1466667+00:00 when I try type E:\Diary it says Acces denied, idk why
-
MotoX80 • 36,416 Reputation points
2024-01-19T16:02:28.54+00:00 Use the Windows explorer and check the folder security permissions.
-
Sakite Sakite • 0 Reputation points
2024-01-19T17:17:52.9533333+00:00 I set myself to full control, still cant open the file
-
MotoX80 • 36,416 Reputation points
2024-01-19T17:36:31.6233333+00:00 Can you open txt files that are on the C drive? Can you create and open files with other file types on the E drive?
Echo test > e:\diary\test.xyz notepad e:\diary\test.xyz
Have you tried rebooting? More thoughts: are you trying to open recently created files? Can you open older txt files? Check task manager and see if your script is still running. It might have an open handle on these files.
-
Sakite Sakite • 0 Reputation points
2024-01-19T17:58:07.5633333+00:00 The script is not running, I cant open ANY text files. I can open other file types
-
Sakite Sakite • 0 Reputation points
2024-01-19T17:59:33.2266667+00:00 And it works when I say Open With and the Visual Studio Code. So it has to be sth with notepad
-
MotoX80 • 36,416 Reputation points
2024-01-19T18:19:27.1666667+00:00 If you get access denied with the "type" command, then it's not just notepad. Sounds like an anti-virus problem. Reboot and try it again.
-
Sakite Sakite • 0 Reputation points
2024-01-19T19:59:32.9166667+00:00 Well the anti virus did flag my script as a virus first
-
Sakite Sakite • 0 Reputation points
2024-01-20T07:23:53.3933333+00:00 Ok the "type" works now
-
Sakite Sakite • 0 Reputation points
2024-01-20T07:24:06.5966667+00:00 But I still cant open the file
-
Sakite Sakite • 0 Reputation points
2024-01-20T07:32:24.9866667+00:00 OK so, I reinstalled notepad. It still doesnt work. But now I cant even open Notepad alone
-
MotoX80 • 36,416 Reputation points
2024-01-20T13:24:00.56+00:00 Forum users have no way of knowing what all you changed on your pc.
What error do you get when you open notepad? Try launching it from a command prompt.
Check your application and system eventlogs for errors.
Did you reboot?
Have you installed all available Windows Update patches?
Run my "IsWindowsHealthy.bat" file from an admin command prompt.
https://learn.microsoft.com/en-us/answers/questions/118183/how-to-fix-error-0x80070543-in-windows-10
-
Sakite Sakite • 0 Reputation points
2024-01-20T15:30:14.6233333+00:00 OK, first I dont get any error when opening Notepad (its called editor for me) When I open it from command prompt it says it cant find the file. Idk how to check those Already 3 times restarted I have all windows updates When I try start IsWindowsHealthy.bat it says an error that the file cant be found
-
Sakite Sakite • 0 Reputation points
2024-01-20T15:35:05.3366667+00:00 Something is really wrong
-
Sakite Sakite • 0 Reputation points
2024-01-20T15:36:10.2066667+00:00 -
Sakite Sakite • 0 Reputation points
2024-01-20T15:36:47.84+00:00 This is the error I get when I try to open the .bat file:
-
MotoX80 • 36,416 Reputation points
2024-01-20T16:00:05.53+00:00 Something is really wrong
I would agree.
Open a command prompt with "Run as administrator", CD to the folder where you put the file and run it from there.
You might first want to run a Windows Defender full scan of your PC. Also run MS's MRT tool. https://www.bing.com/search?q=windows+mrt
-
MotoX80 • 36,416 Reputation points
2024-01-20T17:54:44.3733333+00:00 Your best bet might be to find someone who is knowledgable with troubleshooting Windows. Sit him in front of your pc and show him what it's doing. Tell him what software you've installed, what recent changes you've made, when the problem started, and explain about your script being detected as a virus. Let him look around and see if he can figure out what's wrong.
-
John SHEE • 0 Reputation points
2024-04-08T20:33:25.21+00:00 I had the same issue today, I went to the Windows Notepad page and clicked Download.
https://apps.microsoft.com/detail/9msmlrh6lzf3?hl=en-US&gl=US
Problem solved.
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
-
Deleted
This comment has been deleted due to a violation of our Code of Conduct. The comment was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Sign in to comment