Solved

How to store file in a name.sim directory?

Posted on 2004-04-29
6
156 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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