Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading directory path for input file

Status
Not open for further replies.

hnng

Civil/Environmental
Aug 17, 2007
38
Hi All,

Is it possible to read the directory path of the input file which has been read and then store it in a variable.

This way I can use that variable, concatenate it with another string (file name) which will server as the path for my output file.

This will help me move the code from one machine to another without going through the hassle of changing all the paths for output file.

Regards
 
Replies continue below

Recommended for you

Hi,
you surely can define a "string" variable.
But, I seem to remember that there is no key of the *GET command to allow the retrieval of the current working directory.
If your APDL is used to read/write files in the jobname's directory, however, you don't need to bother about the directory itself since the file reading/writing will be by default executed there.
... Or I may have misunderstood your problem...

Regards
 
Hi cbrn

You got my problem right. The problem with using strings is that they are limited in length and thus i am not able to putt the full path after concatenation.

Thus I was looking for something more direct.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor