Solved

Get the current working directory

Posted on 2004-09-09
9
915 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

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…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

719 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