Click here to Skip to main content
15,914,165 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is the ligne of the code it is simple
imwrite(i,'C:\Users\user\Desktop\Nouveau dossier','jpg');
and here is the error :
VB
Error using imwrite (line 455)
Unable to open file "C:\Users\user\Desktop\Nouveau dossier" for writing.  You may not have
write permission.
Posted
Updated 1-Apr-14 12:07pm
v2
Comments
CHill60 1-Apr-14 18:36pm    
Are you logged on as "user"? If not then you cannot write to that folder unless you are running the program with Administrator rights
Member 10691076 1-Apr-14 18:42pm    
yes i m logged in as user i tried to change the folder pat many times but nothing works
CHill60 1-Apr-14 19:14pm    
If you use Windows Explorer and navigate to that folder, can you right-click and create a new text file?
Member 10691076 1-Apr-14 19:23pm    
thx alot i checked up the user authority on that file i found that i havent the right to write in it thx for ur help
CHill60 1-Apr-14 19:27pm    
As long as it is sorted now. I'll post a solution if you don't mind

1 solution

OP reviewed the permissions on the folder and has confirmed that they didn't have write access.
To summarise: Quick way to check is to navigate to the folder using Windows Explorer and attempt to right-click, create new text file.
You can always examine the folder properties to check permissions in the same place
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900