11-27-2008 04:31 AM
Hi,
I am using the system exec vi to call a patch file that prints a .txt. or .prn file depending on the request of the user. I was ahving some issues with it not being able to find the batch file however I have solved that but now i get this error from the standard output string:
Error: could not open print_test.txt for reading
print_test.txt is the file it is trying to print. I am not sure what is causing this
any ideas would be appreciated
Thank you
11-27-2008 12:54 PM
11-28-2008 02:55 AM
Hi Dowden,
Thanks for the post!
I beleive there is another reason - the file could be in an area with limited access, maybe try it in admin login and maybe (if its not the case) place the file in My Documents and see if it works. Sometimes errors like this as seen if your reading/writing a file to the program files (and whole host of locatiosn of Vista).
Please let us know how you get on / more details if the problem is still an issue,
kind Regards,
James.
11-28-2008 05:40 PM
12-01-2008 05:52 AM
Did you manange to resolve your issue, if you could please update us that would be great!
Kind Regards,
James.
12-02-2008 03:45 AM
Hi all,
I think I have solved the problem by moving the files to another location, from my experimentation with this it seems that there is a limit to the length of the path which can be used. so simply moving the files to another folder resulting in a shorter path seems to work.
This will work as a temporary solution, but I am a little bit worried that people may rearrange the file structure and this will happen again so I am still looking into a better solution.
Thank you for all your help
Adam Dowden
12-02-2008 03:52 AM - edited 12-02-2008 03:53 AM
12-02-2008 04:06 AM
Hi Adam,
Thanks for the post and I hope your well today.
There are maximum limits, imposed by Windows , on how long you can have an ASCI file name and the full path as follows:
MAX_FILE_NAME is 256
MAX_PATH is 260
I beleive this is correct ... however does seem to be some confusiong. You can make your own mind from a very resources...
Max length of VI file paths and file names
http://forums.ni.com/ni/board/message?board.id=170&message.id=28207&requireLogin=False
Hope this helps alittle,
http://www.british-genealogy.com/forums/archive/index.php/t-8252.html
Naming a File or Directory
http://msdn.microsoft.com/en-us/library/aa365247.aspx