Solved

How to store file in a name.sim directory?

Posted on 2004-04-29
6
155 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
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

777 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