![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
Setting location for a temp file
Hi,
I have got a script to create a temp file using: ($fh, $filename) = tempfile(SUFFIX => '.vcf'); Now you can set the location directory of this file using: $dir = tempdir( CLEANUP => 1 ); ($fh, $filename) = tempfile( $template, DIR => $dir); But that puts the temp file in a directory in the /tmp directory. Something like: /tmp/Ir9usvCuAr/GykBOCKgOc My question is how can I set a directory to hold these new temp files somewhere else in the file structure? Somewhere like /home/me/public_html/thisplace_here/ Thanks for any advice ![]()
__________________
Don't wound what you can't kill |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Oct 2004
Location: England, UK
Posts: 139
Rep Power: 0
![]() |
Should have said that just putting the path in $dir just gives an error.
![]()
__________________
Don't wound what you can't kill |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Perhaps you have spaces in the path? Are you escaping backslashes, if you're using backslashes? (You don't mention your system.)
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem processing file into a char array | csrocker101 | C++ | 1 | May 8th, 2007 11:50 PM |
| converting string to float | beginnerCCC | C | 22 | Oct 2nd, 2006 11:59 PM |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 8:55 AM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 9:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |