Solved

How to store file in a name.sim directory?

Posted on 2004-04-29
6
157 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

735 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