Solved

Get the current working directory

Posted on 2004-09-09
9
909 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
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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 38 total points
ID: 12023483
// Get root to this directory
request.pathRoot = getDirectoryFromPath(getCurrentTemplatePath());
0
 
LVL 12

Assisted Solution

by:jyokum
jyokum earned 37 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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

929 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now