Replace spaces in CFFILE upload with - ( part II )

I had it working, I know I did...
#rereplace was doing just what I needed but for some reason
it wont work now,
and I am going insane.
Is there another way to replace spaces in a file name during
the course of a CFFILE upload?
I want to replace any spaces in a file name with a hyphen,
directly after uploading, before anything else is done
( or during file upload if possible).
Michael Evangelista
Evangelista Design / Evangelista Consulting, inc.
www.evangelista-web.com
Custom Small Business Website Solutions

THANK YOU DL.! perfect!
Michael Evangelista
Evangelista Design / Evangelista Consulting, inc.
www.evangelista-web.com
Custom Small Business Website Solutions
"dlashier" <[email protected]> wrote in
message news:e8fijc$oi9$[email protected]..
> <cfset srawname =
REReplace(rawname,"[[:space:]]","","ALL")>
>
> will strip them, obvious change to replace with dash.
>
> - DL

Similar Messages

  • Replacing space in GO URL with %20

    Hi,
    I have created a GO URL and passing the branch name to the target report. The target report has "Is Prompted" filter for the Branch.
    The branch names has spaces between them. eg: "AAA - BBB" like this. To replace the space, i have used the following: REPLACE("EMPTrack".BRANCH,' ','%20') it is also encoded as "AAA%20-%20BBB"
    But when the request is run and the Branch name is navigated to the target report, the space in the branch name is replaced with "," instead of space itself.
    Kindly help me.
    Regards,
    Bhuvan R

    Hi ,
    Try to use '+' sign.

  • Filename: Replace spaces with underscores

    Greetings,
    I have searched the forum and online and have not found an
    answer.
    So posting here for assistance.
    What is the proper syntax for replacing spaces in file names
    with under
    scores prior to cffile upload? -or- what is the best method
    to accomplish
    this process?
    Example:
    document name.doc >> document_name.doc
    Thanks
    Leonard

    you can't change the filename before the file has been
    uploaded to your
    server.
    upload a file using cffile.
    #cffile.serverfile# variable will contain the name with which
    the file
    has been saved on your server.
    check if the name contains any spaces using find() cf
    function.
    if it does, use cffile action="copy" to copy the file as a
    file with no
    spaces in the name (use replace() cf function to replace
    spaces with
    whatever you want).
    [you may want to make sure prior to copying the file that
    there is not
    already a file with same name (with no spaces) in that
    folder, otherwise
    the copy action will overwrite existing file]
    delete original file.
    details of all the functions are in the CFML Reference. if
    you do not
    have one - download free from adobe.com
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Replacing spaces with dashes

    Photoshop CS4 is replacing spaces in the filenames with dashes. How do I make it stop doing that?

    in save for web? look at the options. probably set to unix file systems. you know that file names on the web (if that's your intended use) may not contain spaces, rigth?

  • Replacing space with some char in report display

    dear friends
    hw can i replacs space in report display with char .
    there is disply like
                     site 1    site2   site3
    matnr1           space      10        space
    matnr 2            2        space     space
    site in x -axis  ,matnr in -y-axis.
    i want to replace this space  by some char like nd or ns  etc
    can any one give solution....
    regards
    veera

    hi this my condtion .....
    if the first condtion satisfed i have to replace by ND
    which is now mentioning as space.if send condtion satisifed  having 10(na) in display
    loop at it_final1.
                        read table it_final2 into wa_final2 WITH KEY matnr = it_final1-matnr.
                               IT_RESULT-matnr = IT_final1-matnr.
                               IT_RESULT-WERKS = IT_final1-vstel.
                        if it_final1-LFimg = wa_final2-vsolm.
                             it_result-LFimg = 'nd'.
                            ELSEIF IT_FINAL1-LFIMG < WA_FINAL2-VSOLM.
                                 it_result-LFIMG = WA_FINAL2-VSOLM - IT_FINAL1-LFIMG.
                                 ELSEIF WA_FINAL2 IS NOT INITIAL.
                        IT_RESULT-lfimg = IT_final1-lfimg.
                        else.
                        IT_RESULT-lfimg = IT_final1-lfimg.
                                     ENDIF.
                        COLLECT it_result.
        ENDLOOP.

  • How do I use CFTHREAD in combination with CFFILE Upload

    I've been reading how CFTHREAD is supposed to release the
    client so that long-lasting operations like a CFFILE upload can
    continue to do their business while the client does something else.
    How does this work exactly? I can't find any concrete
    references. For example, I have a regular file upload form. A user
    uploads a large file, say 100Mb, and I want to use CFTHREAD (or
    something) to handle the upload process, which I know may take
    hours depending on the connection, and immediately return the page
    for the client saying "Your file is being processed. Please check
    back later."
    I tried wrapping some CFFILE code with CFTHREAD, but when I
    ran it the page just sat there working while the file was being
    uploaded, so I did not witness any change whatsoever in how its
    being handled. What am I missing?
    <cfthread action="run" name="uploadVideo">
    <cffile
    action="upload"
    destination = "/var/www/video1/assetsIN"
    nameconflict="overwrite"
    filefield="video" />
    </cfthread>
    Thanks for any help.
    UPDATE: I asked Ben Forta this in an email yesterday and here
    was his response:
    What you are doing is correct. The actual file processing
    (getting the uploaded file) will not happen in a separate thread.
    Were you expecting a separate thread for the upload itself? CF
    can’t do that for you s CF does not have the file until it is
    uploaded. Actually, CF is not even called until the form is
    submitted (which includes the file being uploaded). It sounds like
    you want the browser to do an upload in the background. This may be
    doable using JavaScript and Ajax type controls. Or maybe using
    browser tabs or something. -Ben

    With file uploads the time consumption is between the client
    PC and the web
    server, not the web server and the CF server (which are
    usually on the same
    machine). All <cffile action="upload"> does is copy the
    uploaded file from
    the web server's temp upload dir to [wherever you tell it to
    go]: it's a
    local process, and should be fairly quick; certainly compared
    to the
    process of getting it to the web server in the first place.
    Even if the data transmission was between the client PC and
    the CF server,
    you can't expect <cfthread> to somehow increase the
    bandwitdh and speed up
    the file upload between the two machines.
    <cfthread> could come into its own if you had some file
    processing to
    perform on the file *after* it's uploaded: unzipping it,
    doing some image
    manipulation, parsing a CSV file into a DB, that sort of
    thing. Not for
    the initial upload.
    Adam

  • Replacing space with special char in reporting

    I have created a calculatd Keyfigure where if the consition given in the calculated KF satisfies then it displays 1 otherwise space ,now mu user wants space to be replaced by some special charcter
    Example
    My ckf is like this overallscore >= 90 & Iam applying count on this
    Vendor   CKF
    X              1
    Y
    Z                1
    As vendor y is not satsifying the condition its showing with space now I want to replace space with some special char how is this possible

    Hi Priya,
    You can try this: Instead of space, fill this with a 0. Then in the query properties, set the Show Zero As and give your special char, like may be *. But this will be okay if you do not have other zeros in the report...else you may need to do some VB coding.
    Hope this helps...

  • Layers to files: replace spaces with underscores

    How can I update the script to replace spaces with underscores on export? I assume I need to add a line somehwere between 183-195 but I don't know what it needs to be. Thanks in advance.

    Where did you get the Layers to files script. Photoshop versions ship with a "Export Layers To Files.jsx" CS6 lines 183-195 look like this I see nothing about filename
      var layerSetsCount = app.documents[docName].layerSets.length;
             if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strAlertNeedMultipleLayers );
                            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
            } else {
                var rememberMaximize;
                var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
                if ( exportInfo.fileType == psdIndex && app.preferences.maximizeCompatibility != needMaximize ) {
                    rememberMaximize = app.preferences.maximizeCompatibility;

  • Replace spaces with a + sign

    Hi,
    In on of my columns I have a text... I want to replace spaces with a plus (+) sign... something linke this
    select
    text_field,
    Function_replace(text_field, " ", "+") new_field
    from
    table_A

    It's almost that:
    SQL> with table_a as (
      2  select 'abc dd   efg ' text_field from dual)
      3  -- end of sample data
      4  select text_field, replace(text_field, ' ', '+') new_field
      5    from table_a;
    TEXT_FIELD    NEW_FIELD
    abc dd   efg  abc+dd+++efg+
    SQL> edit:
    If you want to replace any number of consecutive spaces for a single + sign, then:
    SQL> with table_a as (
      2  select 'abc dd   efg    h' text_field from dual)
      3  -- end of sample data
      4  select text_field,
      5         regexp_replace(text_field, ' +', '+') new_field
      6    from table_a;
    TEXT_FIELD        NEW_FIELD
    abc dd   efg    h abc+dd+efg+h
    SQL> Edited by: fsitja on Mar 31, 2010 12:27 AM

  • Help Needed - replacing space with non-breaking space on the fly

    Hi,
    I have a text field I'm trying to fiddle the input on. Basically I want to replace all spaces (ascii code 32) with non-breaking spaces (ascii code 160) as they are typed.
    It seemed as though a KeyListener was the way to go, and I've successfully detected whenever a space is sent. I can consume() that KeyEvent, or setKeyChar to change it to another key. But I cannot see how to change it to a non-keyboard character.
    Any suggestions?

    i think you can do smt likeDocument doc = mySwingTextComponent.getDocument();
    doc.setDocumentFilter(new MyDocumentFilter());
    class MyDocumentFilter extends DocumentFilter {
       public void remove(DocumentFilter.FilterBypass fb, int offset, int length) throws BadLocationException {
          fb.remove(offset,length);
       public void insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException {
          replace(fb,offset,0,string,attr);
       public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
          text.replaceAll("SPACE","NB WHITE SPACE");
    }asjf
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/DocumentFilter.html

  • Syncing hebrew notes with icloud distorts them by replacing spaces with exclamation marks. how do i fix this?

    syncing hebrew notes with icloud distorts them by replacing spaces with exclamation marks. how do i fix this?

    I'm syncing my iPhone 5 and my iCloud account. I open the account on my PC with a Google Chrome browser.
    iPhone:
    The same note on iCloud:
    So.. Any ideas?

  • Multiple image upload with save to database problem

    I am developing some backend work for a client, and we recently used the Multiple image upload with save to database wizard without a problem. A few days later, we noticed that we could only upload a single file at a time - it seems that the coding is no longer able to access the flash part of this and is using the javasript function instead. I know the web hosting company has made some changes on the server, and I did some reearch and it seems that  there could be an issue with Flash 10, but has anyone else experienced anything like this? Any help is greatly appreciated.
    Thanks.
    Jeremy

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

  • I have replaced my old Mac Mini with new one.  What should I do about my Time Capsule?

    With the old Mac Mini (2009 model) I used Time Machine and a Time Capsule to back up everything on the Mac Mini itself and on external hard drive I added when I needed more storage space.  I've replaced the old Mac Mini with a 2011 model, and migrated the contents of the old one to the new one from Time Machine. 
    I'm now trying to figure out what I should do to my Time Capsule and/or Time Machine to make backups going forward of the same content, now on my new Mac Mini and same external hard drive. 
    When I go into Time Machine, it does not seem to recognise the items on the external hard drive as ones that I can backup (or not, as there were some items there that I did not and do not wish to backup to Time Capsule) through the new Mac Mini. 
    I am uncertain too whether the Time Machine/Time Capsule will recognise the items of my old Mac Mini as the same ones that are now on my new Mac Mini and save changes there, or whether it will try to save all over again all the same items, as they are now on a different computer. 
    My inclination is to clear out the contents of the Time Capsule now and start all over again.
    I have looked through information provided by Apple but not found answers to my questions.

    The situation concerning the hard drive is complicated.  It is not included in the list of Excluded Items.
    If the drive is not "Excluded", then it must be included.  That is the way that Apple's software works.
    But, nor am I given the option to select it or any of the items in it for adding to the list of Excluded Items.
    If you want to add an item to the list of Excluded items, click the + button at the bottom of the Excluded list, then navigate to select the drive to add it. Once the drive has been added, you can go back in and select the items.
    When I go into the exclude from backup area and select the hard drive, it and the items in it appear in dimmed form, but I cannot select them.
    Sorry, I do not understand what you are trying to say here.
    What I want to do, but cannot, is what I did before, select one of the items in it not to be backed up and leave the rest to be backed up
    I have no idea how you were able to do this. As long as I can remember, Time Machine will not allow you to pick and choose items on a drive to be backed up or excluded. Your option is to have the entire drive backed up, or the entire drive to not be backed up.
    have not seen the 'Quick Erase' option.
    You would use AirPort Utility to erase the Time Capsule drive. Open AirPort Utillty and click the Disks tab at the top of the screen. Then, click Erase Disk.  The Quick Erase option will appear.

  • File upload with 'asp vb' backend

    Hello,
    I am trying to get file uploading with flex (flash buider) working. There are plenty of examples with a php backend, but i need the script for a 'asp vb' backend.
    I' ve tried lots of different approaches but can't get it right. Someone out there with a solution?
    Thanx!!

    Believe it or not I have to do this also.
    I have legacy ASP code that uses ASPUpload that I'd like to get working with my Flash CS5 and FlashBuilder Burrito front-ends.
    it's just multipart encoded.
    So, if you first test it with ASPUpload and a simple form, trying just FILE1 first, and it works with ASP backend then tackle the FlashBuilder side with some debugging.
    ASPUpload is still an extremely embedded component on tens of thousands if not more sites, and it was just updated, but I think the previous version just before this update, the one that's out there in code on so many sites, that is what Flash needs to work with.
    ASPUpload is doing its part, as it follows all the multipart encoded RFC rules and has worked for years.
    I'd love to join you in finding out what's going on here.
    This is a long-standing issue.
    I've done PHP also.  But again, enhancing an interface with FlashBuilder4 or Burrito, to integrate with working legacy code makes it hard when something is not working on the Flash side (it appears anyway) as ASPUpload form posts are extremely easy.

  • To completely replace an existing web page with another

    Dreamweaver CC / Windows 7 / ...nube
    So , bought a domain and w/hosting (major headache) ...  I run into this "Make your webpage ..." offer .. with all the excitement and hoopla , I decided to take the "do-it-now-modify-later" route ... Hah !!! ... do I need to continue ? .
    Ok , so , how do I completely replace the existing layout / template with the one already on the site , which basicly is just a header and a name .... ?  FTP connected ... webpage in Dw already .
    I appreciate and can use all the help I can get
    vahn

    >Though that is what I thought but would so doing , I wondered ,
    >keeps the older page still active ? , like in the back or underneath the new page ?
    Keep in mind that Unix servers are case sensitive, so index.html is not the same file as Index.html. Maybe that's part of your problem?

Maybe you are looking for

  • How can I edit a video clip in PE and take it out of PE to use elsewhere?

    I want to add edited video clips from PE to use in my photoshop slideshow. I would also like to use the edited clips in another programme, but I only get a file that can only be opened in PE. I have PE 4 and Photoshop 6.on a desktop PC using Vista. M

  • Issue with TextArea resize event

    Hi, In the following sample there is a button and a textarea in a VDivideBox. If you move the divider, the Textarea is resized and in its resize event I change the fonts size. It works very well except in one case: If the Textarea is given the focus

  • BDC Code for Loan to Employees

    Dear Friends, I have to write a BDC where I have to debit the G/L of Empoyee Loan and credit individual employee accounts. If you have a similar BDC code available with you please share the same with me. Regards, Alok.

  • Tax code error while entering Expense Receipts in TRIP transaction

    While entering Expense Receipts in the transaction TRIP (Travel Manager), I get an error saying.. "Entry TAXUSJ V0  does not exist in T007A (check entry)". 1) Please help me understand the cause for this error. As the  Travel Expense system is connec

  • Problems with synchronizing iCal with iCloud accounts on my Mac Pro

    I have problems with synchronizing iCal with iCloud calender accounts on my Mac Pro runnning OS 10.6.8 (error message "HTTP/1.1 403 Forbidden" på handlingen CalDAVAccountRefreshQueueableOperation.) It works fine on iOS devices.