Solved

Get the current working directory

Posted on 2004-09-09
9
908 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
Comment Utility
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
Comment Utility
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
Comment Utility
what do i give for the connection attribute
it is throwing an error for whatever i give

0
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 
LVL 21

Expert Comment

by:pinaldave
Comment Utility
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
Comment Utility
// Get root to this directory
request.pathRoot = getDirectoryFromPath(getCurrentTemplatePath());
0
 
LVL 12

Assisted Solution

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

Expert Comment

by:nathans
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
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 insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

763 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

12 Experts available now in Live!

Get 1:1 Help Now