> John wrote:
> I'm not a unix guy so I appologize for the (hopefully) easy question.
> What's the easiest way to get the file size of a file that is already
> sitting on the server? I need to loop over a list of files and save the
I just use "du -k -d ." (no quotes) which will tell the size of f
of course i meant "wc -c [your_filename_here]"
i'll just get my coat...
/t
>-Original Message-
>From: RADEMAKERS Tanguy
>Sent: Thursday, April 28, 2005 7:59 PM
>To: 'cf-talk@houseoffusion.com'
>Subject: RE: Get file size on UNIX?
>
>&
>something like this?
>
>ls -alh ./ | grep -v ".* \." | awk {'print $5"|" $9'}
or "wc -c"
/t
~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm
> I'd go with the cfdirecotry myself ;)
*cfdirectory* I need a cfspell checker - stupid lexdysia
--
~Blog~
http://www.robrohan.com
~The cfml plug-in for eclipse~
http://cfeclipse.tigris.org
~open source xslt IDE~
http://treebeard.sourceforge.net
On 4/28/05, Burns, John D <[EMAIL PROTECTED]> wrote:
> Yeah, I guess that would work. I was thinking more along the lines of an
> OS function or something.
something like this?
ls -alh ./ | grep -v ".* \." | awk {'print $5"|" $9'}
I'd go with the cfdirecotry myself ;)
--
~Blog~
http://www.rob
1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
- Original Message -
From: "Burns, John D" <[EMAIL PROTECTED]>
To: "CF-Talk"
Sent: Thursday, April 28, 2005 10:19 AM
Subject: RE: Get file size on UNIX?
> Yeah, I guess that wou
PM
To: CF-Talk
Subject: Re: Get file size on UNIX?
CFDIRECTORY will do it, but has the cost of scanning the whole
directory, which may or may not matter. You can also use java.io.File
to do it like this #createObject("java",
"java.io.File").init("/full/path/to/file")
dFusion MX Developer
Wyle Laboratories, Inc. | Web Developer
-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 28, 2005 12:14 PM
To: CF-Talk
Subject: RE: Get file size on UNIX?
cfdirectory?
-Original Message-
From: Burns, John D [mailto:[EMAIL
CFDIRECTORY will do it, but has the cost of scanning the whole
directory, which may or may not matter. You can also use java.io.File
to do it like this #createObject("java",
"java.io.File").init("/full/path/to/file").length()#, but that
obviously has to be done individually for each file. Both of
cfdirectory?
-Original Message-
From: Burns, John D [mailto:[EMAIL PROTECTED]
Sent: Thursday, 28 April 2005 11:58
To: CF-Talk
Subject: Get file size on UNIX?
I'm not a unix guy so I appologize for the (hopefully) easy question.
What's the easiest way to get the file size of a file that
Unless you want the users system to try and open the file in the
associated program, don't use a specific type...
Here is an example...
name="Content-Disposition"
value="attachment;
filename=#DOCUMENT_NAME#.#DOCUMENT_EXTENSION#">
file="#variables['strDoc']#"
type="application/x-unknown
ok but since it'n in pdf what type do i use in cfcontent? and is it gonna
stop the rest of the page?
Pat
_
From: Mark Drew [mailto:[EMAIL PROTECTED]
Sent: August 25, 2004 11:35
To: CF-Talk
Subject: Re: get file
checkout cfcontent, depends how you reference your files you can
Hi Pat,
The most common way to do it is to use CFHeader / CFContent in
combination to get the file from a non-web-accessible directory,
looking up the actual path based on an identifier passed in the URL.
If you search the list archives or Google, there should be plenty of
examples out there.
Ch
checkout cfcontent, depends how you reference your files you can have
them all somewhere that isnt web accessable and reference them like
index.cfm?file=mypdf.pfd
MD
On Wed, 25 Aug 2004 11:28:31 -0400, CFDEV <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have files on our server and I want people (once
You can use cfcontent to serve the file - it does not even need to be inside the
web root.
-Mark
-Original Message-
From: CFDEV [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 10:29 AM
To: CF-Talk
Subject: get file
Hi,
I have files on our server and I want peopl
If you've got a JRE installed on CF, then you can just use java.io.File to
do it. Have to double check, I think this is the right syntax:
File = createObject("java", "java.io.File");
File.init(path_to_file);
fileSize = File.length();
Cheers,
barneyb
> -Original Message-
> From: Michael
>
>Is it possible to get a list of files in a folder to store in an array? I
>can do it in vbscrip but I am new to CF and could do with some help.
>
Look in to the cfdirectory tag. It'll do everything you want and then some.
Regards,
Dave.
[Todays Threads]
[This Message]
[Subscription]
[F
Check out CFDIRECTORY as well as CFFILE if you need.
-Original Message-
From: John Croney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 2:52 PM
To: CF-Talk
Subject: Get file list
Is it possible to get a list of files in a folder to store in an array? I
can do it in vbscrip but I
Use
directory="/abs/path/to/dir"
name="filelist" />
'filelist' will be a standard query object containing a list of the files in
the directory. You can optionally specify a 'filter' attribute to
CFDIRECTORY to narrow the files returned. It accepts literal chars, as well
as '?' and '*' wildcar
John Croney wrote:
> Is it possible to get a list of files in a folder to store in an
> array? I can do it in vbscrip but I am new to CF and could do with
> some help.
>
Have a look at CFDirectory. It will return you a query with all sorts
of info about files in a particular directory.
Stephe
20 matches
Mail list logo