SluX_mon
asked on
How to store file in a name.sim directory?
I have a problem.
AssignFile(f,filename);
Rewrite(f);
i get an error that it is invalid filename.
And filename is pics/new.sim/filename
It is very important for me that the middle dir is called new.sim
How can i do this then?
Please help, i m desperate.
AssignFile(f,filename);
Rewrite(f);
i get an error that it is invalid filename.
And filename is pics/new.sim/filename
It is very important for me that the middle dir is called new.sim
How can i do this then?
Please help, i m desperate.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Shouldn't it be pics\new.sim\filename instead?
FileName := 'C:\pics\new.sin\filename'
- create full desired file name with path, using ParamStr(0) if needed
- ExtractPathName
- DirectoryExists - check directory existance
- ForceDirectories if directory doesn't exists
- ExtractPathName
- DirectoryExists - check directory existance
- ForceDirectories if directory doesn't exists
ASKER
Sorry guys, i cant give you points. As soon as i posted i realized that not all .sim directories were created(there are over a 50 of those).
Thx anyway.
I would be happy if moderator closes this question.
Thx anyway.
I would be happy if moderator closes this question.
I think you should give the points to kretzschmar, after all he gave the right answer and you posted that you had already found the answer 6 hours after he posted his answer.