Re: 'safe' filename UDF

2006-01-06 Thread Ray Champagne
That is exactly what I'm looking for.

Baz wrote:
 I have a UDF that removes any chars besides letters, numbers, underscore and
 any additional good chars you specify to keep.
 
 USAGE
 AlmostAlphaNumeric(FileName); // returns all letters, numbers and underscore
 AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these chars:@()
 
 Is that something u are looking for?
 
 Baz
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: January 5, 2006 11:34 AM
 To: CF-Talk
 Subject: Re: 'safe' filename UDF
 
 Actually, that *is* what I do, too.  But, this app was written long ago, 
 by someone else, and has been running this way for a while.  Somehow, an 
 issue never came up until someone uploaded an image file named Lot 
 #31.jpg, which caused an error when displaying a popup image window. 
 Changing the way the whole thing works at this point just isn't going to 
 fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
 do, if I don't hear anything here today, I'll prolly just figure out how 
 to do it myself.  It's about time I learned how to use RegExp's anyways.
 
 Thanks
 
 Ray
 
 Bobby Hartsfield wrote:
 
I don't, but what I usually do is save the original file name as is just
 
 for
 
display purposes so the person who uploaded it can spot it easily. Then
rename the file according to some other things... like and ID in the
database, a category, etc... 

So a link to a file might look like...

a href=0001.pdfOld File Name.pdf/a

Just an idea...
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 05, 2006 11:02 AM
To: CF-Talk
Subject: 'safe' filename UDF

Anyone have a good UDF to replace bad characters in a filename with 
safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
periods, etc?  I just looked on cflib and found nothing.

 
 
 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228624
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: 'safe' filename UDF

2006-01-06 Thread Baz
 

 

Well here she be: http://thinkloop.com/filez/almostalphanumeric.zip

 

Cheers,

Baz

 

 

 

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 06, 2006 9:09 AM
To: CF-Talk
Subject: Re: 'safe' filename UDF

 

That is exactly what I'm looking for.

 

Baz wrote:

 I have a UDF that removes any chars besides letters, numbers, underscore
and

 any additional good chars you specify to keep.

 

 USAGE

 AlmostAlphaNumeric(FileName); // returns all letters, numbers and
underscore

 AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these
chars:@()

 

 Is that something u are looking for?

 

 Baz

 

 -Original Message-

 From: Ray Champagne [mailto:[EMAIL PROTECTED] 

 Sent: January 5, 2006 11:34 AM

 To: CF-Talk

 Subject: Re: 'safe' filename UDF

 

 Actually, that *is* what I do, too.  But, this app was written long ago, 

 by someone else, and has been running this way for a while.  Somehow, an 

 issue never came up until someone uploaded an image file named Lot 

 #31.jpg, which caused an error when displaying a popup image window. 

 Changing the way the whole thing works at this point just isn't going to 

 fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 

 do, if I don't hear anything here today, I'll prolly just figure out how 

 to do it myself.  It's about time I learned how to use RegExp's anyways.

 

 Thanks

 

 Ray

 

 Bobby Hartsfield wrote:

 

I don't, but what I usually do is save the original file name as is just

 

 for

 

display purposes so the person who uploaded it can spot it easily. Then

rename the file according to some other things... like and ID in the

database, a category, etc... 

 

So a link to a file might look like...

 

a href=0001.pdfOld File Name.pdf/a

 

Just an idea...

 

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.

Bobby Hartsfield

http://acoderslife.com

 

 

 

-Original Message-

From: Ray Champagne [mailto:[EMAIL PROTECTED] 

Sent: Thursday, January 05, 2006 11:02 AM

To: CF-Talk

Subject: 'safe' filename UDF

 

Anyone have a good UDF to replace bad characters in a filename with 

safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 

periods, etc?  I just looked on cflib and found nothing.

 

 

 

 

 

 

 

 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228650
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: 'safe' filename UDF

2006-01-06 Thread Ray Champagne
Thanks, baz.  You rok.

Baz wrote:
  
 
  
 
 Well here she be: http://thinkloop.com/filez/almostalphanumeric.zip
 
  
 
 Cheers,
 
 Baz
 
  
 
  
 
  
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: Friday, January 06, 2006 9:09 AM
 To: CF-Talk
 Subject: Re: 'safe' filename UDF
 
  
 
 That is exactly what I'm looking for.
 
  
 
 Baz wrote:
 
 
I have a UDF that removes any chars besides letters, numbers, underscore
 
 and
 
 
any additional good chars you specify to keep.
 
 
 
USAGE
 
 
AlmostAlphaNumeric(FileName); // returns all letters, numbers and
 
 underscore
 
 
AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these
 
 chars:@()
 
 
 
Is that something u are looking for?
 
 
 
Baz
 
 
 
-Original Message-
 
 
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 
 
Sent: January 5, 2006 11:34 AM
 
 
To: CF-Talk
 
 
Subject: Re: 'safe' filename UDF
 
 
 
Actually, that *is* what I do, too.  But, this app was written long ago, 
 
 
by someone else, and has been running this way for a while.  Somehow, an 
 
 
issue never came up until someone uploaded an image file named Lot 
 
 
#31.jpg, which caused an error when displaying a popup image window. 
 
 
Changing the way the whole thing works at this point just isn't going to 
 
 
fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
 
 
do, if I don't hear anything here today, I'll prolly just figure out how 
 
 
to do it myself.  It's about time I learned how to use RegExp's anyways.
 
 
 
Thanks
 
 
 
Ray
 
 
 
Bobby Hartsfield wrote:
 
 
 
I don't, but what I usually do is save the original file name as is just
 
 
 
for
 
 
 
display purposes so the person who uploaded it can spot it easily. Then
 
 
rename the file according to some other things... like and ID in the
 
 
database, a category, etc... 
 
 
 
So a link to a file might look like...
 
 
 
a href=0001.pdfOld File Name.pdf/a
 
 
 
Just an idea...
 
 
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
 
 
Bobby Hartsfield
 
 
http://acoderslife.com
 
 
 
 
 
-Original Message-
 
 
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 
 
Sent: Thursday, January 05, 2006 11:02 AM
 
 
To: CF-Talk
 
 
Subject: 'safe' filename UDF
 
 
 
Anyone have a good UDF to replace bad characters in a filename with 
 
 
safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
 
 
periods, etc?  I just looked on cflib and found nothing.
 
 
 
 
 
 
 
 
 
  
 
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228652
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: 'safe' filename UDF

2006-01-05 Thread Bobby Hartsfield
I don't, but what I usually do is save the original file name as is just for
display purposes so the person who uploaded it can spot it easily. Then
rename the file according to some other things... like and ID in the
database, a category, etc... 

So a link to a file might look like...

a href=0001.pdfOld File Name.pdf/a

Just an idea...
 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 05, 2006 11:02 AM
To: CF-Talk
Subject: 'safe' filename UDF

Anyone have a good UDF to replace bad characters in a filename with 
safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
periods, etc?  I just looked on cflib and found nothing.

-- 

Ray




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228482
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: 'safe' filename UDF

2006-01-05 Thread Ray Champagne
Actually, that *is* what I do, too.  But, this app was written long ago, 
by someone else, and has been running this way for a while.  Somehow, an 
issue never came up until someone uploaded an image file named Lot 
#31.jpg, which caused an error when displaying a popup image window. 
Changing the way the whole thing works at this point just isn't going to 
fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
do, if I don't hear anything here today, I'll prolly just figure out how 
to do it myself.  It's about time I learned how to use RegExp's anyways.

Thanks

Ray

Bobby Hartsfield wrote:
 I don't, but what I usually do is save the original file name as is just for
 display purposes so the person who uploaded it can spot it easily. Then
 rename the file according to some other things... like and ID in the
 database, a category, etc... 
 
 So a link to a file might look like...
 
 a href=0001.pdfOld File Name.pdf/a
 
 Just an idea...
  
 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
  
  
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 05, 2006 11:02 AM
 To: CF-Talk
 Subject: 'safe' filename UDF
 
 Anyone have a good UDF to replace bad characters in a filename with 
 safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
 periods, etc?  I just looked on cflib and found nothing.
 


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228490
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: 'safe' filename UDF

2006-01-05 Thread Bobby Hartsfield
rereplace(myvar, [^A-Za-z0-9.], , all)

That should replace everything but numbers, letters and a dot

 
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
 

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 05, 2006 11:34 AM
To: CF-Talk
Subject: Re: 'safe' filename UDF

Actually, that *is* what I do, too.  But, this app was written long ago, 
by someone else, and has been running this way for a while.  Somehow, an 
issue never came up until someone uploaded an image file named Lot 
#31.jpg, which caused an error when displaying a popup image window. 
Changing the way the whole thing works at this point just isn't going to 
fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
do, if I don't hear anything here today, I'll prolly just figure out how 
to do it myself.  It's about time I learned how to use RegExp's anyways.

Thanks

Ray

Bobby Hartsfield wrote:
 I don't, but what I usually do is save the original file name as is just
for
 display purposes so the person who uploaded it can spot it easily. Then
 rename the file according to some other things... like and ID in the
 database, a category, etc... 
 
 So a link to a file might look like...
 
 a href=0001.pdfOld File Name.pdf/a
 
 Just an idea...
  
 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
  
  
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 05, 2006 11:02 AM
 To: CF-Talk
 Subject: 'safe' filename UDF
 
 Anyone have a good UDF to replace bad characters in a filename with 
 safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
 periods, etc?  I just looked on cflib and found nothing.
 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228525
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: 'safe' filename UDF

2006-01-05 Thread Baz
I have a UDF that removes any chars besides letters, numbers, underscore and
any additional good chars you specify to keep.

USAGE
AlmostAlphaNumeric(FileName); // returns all letters, numbers and underscore
AlmostAlphaNumeric(FileName,'@()'); // returns the same plus these chars:@()

Is that something u are looking for?

Baz

-Original Message-
From: Ray Champagne [mailto:[EMAIL PROTECTED] 
Sent: January 5, 2006 11:34 AM
To: CF-Talk
Subject: Re: 'safe' filename UDF

Actually, that *is* what I do, too.  But, this app was written long ago, 
by someone else, and has been running this way for a while.  Somehow, an 
issue never came up until someone uploaded an image file named Lot 
#31.jpg, which caused an error when displaying a popup image window. 
Changing the way the whole thing works at this point just isn't going to 
fly.  Wish I knew how to write RegExp's, prolly wouldn't be that hard to 
do, if I don't hear anything here today, I'll prolly just figure out how 
to do it myself.  It's about time I learned how to use RegExp's anyways.

Thanks

Ray

Bobby Hartsfield wrote:
 I don't, but what I usually do is save the original file name as is just
for
 display purposes so the person who uploaded it can spot it easily. Then
 rename the file according to some other things... like and ID in the
 database, a category, etc... 
 
 So a link to a file might look like...
 
 a href=0001.pdfOld File Name.pdf/a
 
 Just an idea...
  
 ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
  
  
 
 -Original Message-
 From: Ray Champagne [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 05, 2006 11:02 AM
 To: CF-Talk
 Subject: 'safe' filename UDF
 
 Anyone have a good UDF to replace bad characters in a filename with 
 safe ones?  ie, replace # signs with blanks, spaces with '_', commas, 
 periods, etc?  I just looked on cflib and found nothing.
 




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228585
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54