well, i am completely confused and moving in circles
let me explain what i am looking

i ahve website runnin on apache home page is test.html

1) test.html has <input type=file> on submit redirects to testicgi
2) test.cgi reads the filename. it is .doc format, performs some operation and create a .xls file.......
3) i want to save the file back to clients machine

problem is in step 2) test.cgi looks for the .doc on server instead of clients machine......i don't know why
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The CGI is a server side program... meaning it runs on the server itself. It does not have direct access to any files stored on the local machine.   Your test.cgi needs to save the file to the server drive first if you want to access it as filename.doc, or if the cgi itself is just performing a conversion the xls format it simply needs to save it as .xls once it is done.  I assume that once complete the user probably would want to download the converted file, so you would provide a link to the new file on the server.    

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
print "Content-Type: application/octet-stream\r\nContent-Disposition: attachment; filename=filename.xls\r\n\r\n";  #the browser is free to ignore filename
print <FILE>;
perlperlAuthor Commented:
1) How can I copy the .doc file from client to server box
2) How can I copy the file back to client's box
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

perlperlAuthor Commented:
1) How can I copy the .doc file from client to server box
2) How can I copy the .xls file from client to server box
2) How can I copy the file .xls back to client's box
u cant use the client resource. u can just allow user to browse the file and upload to ur server. but by cgi coding u cant copy client file to server without user act. user has to upload the .doc file by their wish.
again u cant save back any file to client machine unless clients hits download button or download link.. hope its clear to u
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.