?
Solved

Get the current working directory

Posted on 2004-09-09
9
Medium Priority
?
916 Views
Last Modified: 2013-12-20
Hi,

How do i get the current working directory programmatically in coldfusion.

Actually , i have mapped a path using CFIDE such as C:\Inetpub\wwwroot\cfsamples

but how do i access that path in my code ? Urgent please help.


Thanx in advance

AWSNS.
0
Comment
Question by:awsns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 5

Expert Comment

by:kkhipple
ID: 12021592
have u had a look at
Performing file operations with cfftp
http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applications_with_CFML/remoteServers6.htm

<!--- Get the current directory name. --->
<cfftp connection=Myftp
  action="GetCurrentDir"
  stoponerror="Yes">
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 12021834
Hi awsns,
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-pt9.htm#wp2459859
File management tools are listed there.

Regards,
---Pinal
0
 

Author Comment

by:awsns
ID: 12021836
what do i give for the connection attribute
it is throwing an error for whatever i give

0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
LVL 21

Expert Comment

by:pinaldave
ID: 12021897
Hi awsns,
<cfftp connection="Myftp"
  action="GetCurrentDir"
  stoponerror="Yes">

I think the double quotes are missing.
Regards,
---Pinal
0
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 152 total points
ID: 12023483
// Get root to this directory
request.pathRoot = getDirectoryFromPath(getCurrentTemplatePath());
0
 
LVL 12

Assisted Solution

by:jyokum
jyokum earned 148 total points
ID: 12023601
if you want the directory of the template being executed.
<cfset currentDir=expandPath(".")>
0
 
LVL 5

Expert Comment

by:nathans
ID: 12103699
Are you still needing help with this?  

Are you wanting the use CFFTP?  I would guess not?

Maybe I can help you if not...
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question