Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
coldfusion running commands in windows
How do I run batch commands from coldfusion? Windows 2k server.
I'm trying to do FTP things that CFM can't seem to do with cfftp (like delte an entire directory w/out having to recusively loop).
Web Development Software
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
cfftp tag lets u perform tasks on remote server using file transfer protocol(ftp).
You can use cfftp to cache connections for batch file transfers when uploading or downloading files.
Just a pseudo code for u
<!--- Open ftp connection --->
<!--- Get the current directory name. --->
<!--- output directory name --->
The current directory is: #cf
<!--- Get a listing of the directory. --->
<!--- Close the connection.--->
<cfftp action="close" connection="Myftp">
<p>Did the connection close successfully?
<!--- output dirlist results --->
<p>FTP Directory Listing:</p>
<cftable query="dirlist" colheaders="yes" htmltable>
<cfcol header="<B>Name</b>" TEXT="#name#">
<cfcol header="<B>Path</b>" TEXT="#path#">
<cfcol header="<B>URL</b>" TEXT="#url#">
<cfcol header="<B>Length</b>" TEXT="#length#">
After you establish a connection with cfftp, you can reuse the connection to perform additional FTP operations .
If you're wanting to run a batch FTP process (as from the command line), save your script in a batch file (need help with this? it sounds like you may already know the ropes in this arena), then call the batch file from CF using <cfexecute>:
ipt.bat" timeout="600" outputfile="c:\batchfiles\
You have to remember to add the closing tag, even though there's nothing in the middle.
Hope this helps,
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent