Solved

How to store file in a name.sim directory?

Posted on 2004-04-29
6
159 Views
Last Modified: 2011-09-20
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.
0
Comment
Question by:SluX_mon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 10947924
did the directory exist?
(your filepath is relative to the current dir)
0
 
LVL 17

Expert Comment

by:geobul
ID: 10947972
Shouldn't it  be pics\new.sim\filename instead?
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10947975

   FileName := 'C:\pics\new.sin\filename'
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:mokule
ID: 10948019
- create full desired file name with path, using ParamStr(0) if needed
 - ExtractPathName
 - DirectoryExists - check directory existance
 - ForceDirectories if directory doesn't exists
0
 

Author Comment

by:SluX_mon
ID: 10951757
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.
0
 
LVL 1

Expert Comment

by:Dissaster
ID: 11016972
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connection between libmysql.dll and MySQL Versions 7 131
Installshield for Embarcadero EX 10.1 Berlin 4 90
DBCtrlGrid, Delphi, Scroll 8 84
Firemonkey Queue list 1 51
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question