×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ASSIGN statement for long filepaths

ASSIGN statement for long filepaths

ASSIGN statement for long filepaths

(OP)
I'm having a bit of trouble with an ASSIGN statement in a NASTRAN data file. I need to assign a file that has a quite long filepath. At first I tried simply putting the statement on a single line like so:

CODE --> .dat

ASSIGN INPUTT4='subfolder_with_a_long_name/subfolder_with_a_long_name/subfolder_with_a_long_name/file.op4' 

However this statement results in a fatal error because apparently it exceeds a line length limit:

CODE --> .f06

ASSIGN INPUTT4='/subfolder_with_a_long_name/subfolder_with_a_long_name/sUBFOLDER
0*** USER FATAL MESSAGE 723 (XTRACI)
     THE ABOVE FILE NAME CONTAINS AN UNBALANCED NUMBER OF DELIMITERS. 

I know that in INCLUDE statements you can simply split the filepath over two lines with a line break. I've tried the same here in the ASSIGN statement, but without success.

So right now I'm stuck and I would be really grateful for any help. Does anyone here know of a solution?

RE: ASSIGN statement for long filepaths

Does the file path and/or name have spaces in it?
I don't know about NASTRAN specifically, but I've had other programs choke on files with spaces in the path. The solution was to add double quotes around the entire file name.

CODE

"C:\temp\some folder with spaces\thefile.xyz" 

RE: ASSIGN statement for long filepaths

(OP)

Quote (cowski)

Does the file path and/or name have spaces in it?
I don't know about NASTRAN specifically, but I've had other programs choke on files with spaces in the path. The solution was to add double quotes around the entire file name.
Thanks for the reply. To answer your question: no, there aren't any spaces in the folder names or file name.

RE: ASSIGN statement for long filepaths

(OP)
Alright, I finally found a solution.smile A comma at the end of the first line signals to NASTRAN that the statement is continued on the next line:

CODE --> .dat

ASSIGN INPUTT4='/subfolder_with_a_long_name/subfolder_with_a_long_name/,
subfolder_with_a_long_name/file.op4' 

Now my NASTRAN file runs as it should.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources