Get current filename or url

Hello Everyone,
is there a function that retreives your current filename?
I would like to be able to know the name of the cfm file i'm
visiting, without the rest of the folder structure.
Thanks for any info!

#getfilefrompath(cgi.script_name)#
query string, if you need it, is available in
#cgi.query_string#
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Similar Messages

  • Getting current server node url.

    Hi,
    I have a requirement where i need to refresh the whole browser.
    1. We have three boxes DEV,ACC,PROD all having different url.
    can u pls let me know hoe to get the current server node url in a Dynpage application.
    What methods can I use for this.

    Hi,
    If you nodes are in cluster you get information from similarly as below:
    import com.sapportals.portal.prt.service.clusterinformation.IClusterInformation;
    public static int getCurrentNodeId() throws PortalRuntimeException
              //     Get the current Node
              final IClusterInformation clusterInfo = (IClusterInformation)PortalRuntime.getRuntimeResources().getService(IClusterInformation.KEY);
              return(clusterInfo.getNodeId());
    public static String getServerName()
              String name = null;
              try
                   InetAddress host = InetAddress.getLocalHost();
                   name = host.getHostName();
              }catch(UnknownHostException hostExcept)
                   LogHelper log = GlobalConfig.getServiceLog();
                   log.log("Error looking up server name: ", hostExcept);
              return(name);
    Hope this will help you.

  • How to get the filename from URL

    Hi,
    I want get the file name from the url while downloading a file. here is my case follows:
    I have url like "http://www.myhost.com/dowloadFile.do?id=345546" . this will download "test.zip"; file from the browser.
    I want download the file from that url and save that as "test.zip";, how can we get the file name "test.zip"; from java. I am using ConnectionURL to download the file.
    waiting for the earliest responses.
    -Bhaskar

    Specify it in the content-disposition header.
    To get it to work in a certain webbrowser, you need to supply it as part of the URL either.
    Also see this example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • How to get current URL from Internet Explorer ?

    Hi,
    I have design an add-on for IE and I'm
    trying to get URL from IE which is currently opened that is which is currently user sees. Is there any way to get it? I want to store that address in label and use it for something useful. Is it possible with C# ?
    I have did the following code to get current URL but it showing last opened URL instead of current URL which is user see
    using SHDocVw;
           SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
                         string filename;
                         foreach (SHDocVw.InternetExplorer ie in shellWindows)
                             filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
                             if (filename.Equals("iexplore"))
                               label1.Text=ie.LocationURL;
                               label1.Text = ie.LocationName;
    and I have tried this one also 
    foreach (InternetExplorer ie innew ShellWindows())
       label1.Text = ie.LocationURL.ToString();
       label2.Text = ie.LocationName.ToString();
    Please give me any suggestion or code to solve this problem.
    Thanks.
    Priyanka

    You already got addon running in the active ie instance. You just need to catch the WindowStateChanged event in every instance so you can write down the last event with OLECMDIDF_WINDOWSTATE_USERVISIBLE somewhere. When you need the active IE instance, just
    pull from your save.
    Note an IE tab may crash and take your addon with it. It is better to start a broker process to store your global data.
    Visual C++ MVP

  • Get current URL no matter who is the user

    Hi
    I'm creating a custom passord page using a Form based on procedure.
    How can I get current URL no matter who is the user ?
    I read previous message where it was recommneded to use WWPOB_PAGE$. Unfortunately, that table show the object compile under PORTAL30 user. We use another user to create or manage our pages.
    Any idea ?
    Thank
    Regis Levesque

    that's usually the root user - follow the instructions here to disable it. The same steps apply in Mavericks.
    OS X Mountain Lion: Enable and disable the root user

  • How can I get a filename during or after saving in CS4/5?

    I'm trying to get the new filename of a file the user is saving.  The way I'm trying to do it right now is to wait until after the file is saved, and then just check the current filename.
    In CS5, I found kAIDocumentWritePostprocessNotifier to be notified after a save,.  But CS4 only has kAIDocumentWritePreprocessNotifier.  I thought of using a timer, but I was wary that my plugin might be shut down before I can take an action if the user is shutting down Illustrator and saving.  Is there some way to emulate this functionality?  Is there a way to check when the file has been saved?  That'd at least let the timer length go under a second safely, by checking repeatedly.
    Or, better yet, is there just a way to get the new filename directly?
    Edit: It appears Postprocess is still too early in CS5.  So, any answer will be helpful for both CS4 and CS5.

    Hello,
    FTP From PL/SQL, look at this,
    http://www.oracle-base.com/articles/misc/FTPFromPLSQL.php
    something like this,
    DECLARE
      l_conn  UTL_TCP.connection;
      l_list  ftp.t_string_table;
    BEGIN
      l_conn := ftp.login('ftp.company.com', '21', 'ftpuser', 'ftppassword');
      ftp.list(p_conn   => l_conn,
               p_dir   => '/u01/app/oracle',
               p_list  => l_list);
      ftp.logout(l_conn);
      utl_tcp.close_all_connections;
      IF l_list.COUNT > 0 THEN
        FOR i IN l_list.first .. l_list.last LOOP
          DBMS_OUTPUT.put_line(i || ': ' || l_list(i));
        END LOOP;
      END IF;
    END;
    / http://www.oracle-base.com/dba/miscellaneous/ftp.pks
    http://www.oracle-base.com/dba/miscellaneous/ftp.pkb
    Hope this helps,
    Christian Balz

  • Is there a way to get the filename only on iOS using CameraRoll?

    This post is a sidetrack from this post: http://forums.adobe.com/thread/848761?tstart=0
    The method used in that post works perfect on both Android and iOS for selecting and uploading files.... BUT is there a way to get the filename of the file from the mediaPromise cross-plattform?
    If you let the user select an image it's not very nice to have the image be called "temp.jpg" after uploading - you want the user to know which image he/her have uploaded
    Any ideas? The "mediaPromise.file.relativePath()" works on Android but not on iOS. Not "mediaPromise["file"].url/relativePath/nativePath" either.
    Thank you

    Hey Joe what do you think of this solution.
    1. Let the user select the image
    2. Store the mediaPromise object in an array (event.data) for later use
    3. Load in the object using loadMediaPremise
    4. Add the loaded image into a movieclip (not visible from the scene)
    5. Resize that movieclip to let's say 100x100
    6. Use the BitmapData class to create a new bitmap from that movieclip and save it to storage
    7. Use the saved file within the app as a thumbail
    8. Use the mediaPromise object stored in the array later when the user wants to upload the images (then go through mediaPromise.open() on each image -> save to storage -> upload -> clear from storage -> loop).
    I haven't tried it yet (will do this week) but should that be a acceptable solution to the problem(?)
    I'm unsure if by just keeping the mediaPromise object within Flash will make the memory run wild though?

  • How to get the filename from J2SE File adapter

    In our project scenario , we are using J2EE and J2SE engine both .J2EE for mapping  and J2SE for Deliveying the message .
    In one senario, routing will be based on the filename .
    J2SE Sender File adapter --- XI Adapter --- XI pipe line
    So the File reaching to XI pipelane via J2SE File adapter--> XI adapter.
    When we are using the dynamic configurator in the XI to get the filename
    we are not able to get the file name  becasue it is coming to XI via
    XI adapter.
    How to get the filename ????Hope I am clear about the problem.

    hi,
    try this
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //obtengo la Key del FileName
    DynamicConfigurationKey keyF = DynamicConfigurationKey.getName();
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/DynamicConfigurationKey.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    /people/mohammed.zabiulla/blog/2008/03/26/have-you-ever-tried-to-determine-mail-cc-dynamically
    Hope it helps
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Apr 11, 2008 9:31 AM

  • How can i get report filename in a fomula column

    Hi,
    We are using Oracle Reports 6i.
    i want to get the filename of current report in a formula column.
    how can we take the current report filename into a variable in a formula column..
    If it is possible please provide your valuable inputs on how to achieve this or please provide any helpful pointers
    Please get back to me if my requirement is not clear
    Thanks,
    anish

    Its not possible to get the report file name in a formula column

  • Getting the filename of a placed image inside a smart object

    Hi
    I'm wondering if I can get any help with a problem I'm trying to overcome for a friend of mine.
    My friend is a photographer who does a lot of schhols work (pupil portraits) and wants to create a little document similar to this (very simplified) version:
    I'm trying to help him to create a batch process so that he can make this take up much less of his time!
    Here's where I've got to so far. I've created the layout above which is essentially a smart object (from an external file) manipulated in a couple of ways.
    The workflow as I see it at the moment (although I'm wide open to suggestions, and I'm having a bit of Friday brain) is this: I generate an action that replaces the content of the external file with the contents of (each file in his incoming list, sequentially).
    That file then comes back into the layout above and a new (flattened) copy is saved out from there.
    Rinse and rerpeat through the list of incoming files.
    I can just about make that bit happen using actions, but here's what I can't get - the filename of the incoming file (the one that's placed in the smart object). Can I can use a modified version of the AddFileName script to generate a text layer based on the filename of the placed contents in the smart object? Does any of that make sense? I'm reading this back to myself and even I'm not sure! ho ho.
    My lack of logic/coherent sentence structure here is what probably holds me back in any eforts I have made in getting into scripting.
    I'd appreciate any help that could be offered.
    Thanks.
    Fenton

    Ah - alas it sems not to be. I think I am going to have to come up with a different workflow and by extension, solution. My current thinking is that I need to have an input folder for the images to be used in the layout, and an output folder for the results to be saved into, along with the layout.psd (as above) all housed in the same folder. Then I need (help) to write a script that does the following:
    Checks that the layout document is open (that bit is easy enough)
    if(documents.length==0){
       alert("You need to have your layout template open (-layout.psd-)")
    }else{
        // Do next bit here - and what I'm trying to do is described below.
        // Hopefully by typing it out I might start to get it straight in my head
        // Any help with any part of this process is greatluy appreciated
        // I'm trying to learn!
    Then what I think the script needs to do is tocheck the contents of the input folder and find out how many files are in it then set this as a variable, to set the length of a loop, maybe? Or should it load the filenames as an array and work through them sequentially?
    Once that information is established, there is a smart object on the first layer that needs to be updated with the contents of the first file - my thinking s that this is done by the script opening each image, and then copy/pasting into the smart object, merging down (so I don't end up with an enormous multi-layered file). My reason for thinking this would be a good idea would be that I could just run a quick check to make sure that no landscape pics have sneaked in there and if they have, rotate them (which again, is pretty easy as even I could do that bit, too).
    doc = activeDocument;
                if (doc.height < doc.width) {
                  doc.rotateCanvas(90);
                } else {
                  // Carry on
    This will update all of the smart object instances throughout the layout template.
    Then the text underneath the main image needs to be updated with the filename of the file that has been pasted in the smart object, and after that a [flattened] copy saved out to an output folder.
    Rinse and repeat for the remaining images in the input folder.
    Any thoughts?
    Thanks
    Fenton

  • Getting PDF filename with unicode chars

    Hello,
    I'm trying to write a plugin that gets the file path of the current active document. The code looks like this:
    AVDoc avDoc = AVAppGetActiveDoc();
    PDDoc pdDoc = AVDocGetPDDoc(avDoc);
    ASFile file = PDDocGetFile (pdDoc);
    ASPathName filePath = ASFileAcquirePathName (file);
    This works fine for most documents, but for documents with unicode characters in the name each unicode character is replaced with '.' in filePath. For example, if the document is "测试中文关键词搜索!@#$%^&().pdf", then filePath becomes ".........!@#$%^&().pdf". Am I missing something required to get unicode filenames?
    Thanks.

    You were right, the plugin was getting a char* from ASFileSysDisplayStringFromPath. I removed that and added this which seems to have fixed my problem:
    ASText pathText = ASTextNew();
    ASFileSysDisplayASTextFromPath(ASGetDefaultFileSys(), filePath, pathText);
    wchar_t *pathString = (wchar_t*)ASTextGetUnicode(pathText);
    Thank you!

  • Get input Filename

    Hi all,
    I need to get the name of the file i am currently reading from the sender system directory. I was thinking to send the filename as a tag to the output so that i can retrieve it at the output payload.
    If i can get the file name in some user defined function, i can map it to some output field.
    How can I get the filename using a function in XI

    Hi Rahul,
    Check out this blog by michal in which he has made a java function to retrieve the filename and map it to one of the xml tags...but to achieve this you should be working on SP14..
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards,
    Sushumna

  • How can I get the Lync Meeting URL programmatically in C#?

    Currently I am running an ASP.NET web application and my web page needs to provide a button to get the Lync Meeting URL just like the Outlook does:
    Please see the screenshot here: Lync
    Meeting Address in Outlook
    The behavior of this button is when it is clicked, the Lync Meeting URL is retrieved (maybe from the Exchange server) and is shown on a asp:Label control on the web page.
    I googled but I have been told that there are three SDKs can be considered for this scenario:
    Lync SDK - seems the Lync client must be running while the SDK is in use
    Microsoft Unified Communications Managed API (UCMA)
    Microsoft Exchange Web Services (EWS)
    I am really confused on these three SDKs, and don't know how to achieve my goal by utilizing these SDKs, could someone please help me? It would be much appreciate if you can post some sample code here.

    Hi,
    You'll receive a better response posting this thread in the Lync Development forums here;
    https://social.msdn.microsoft.com/Forums/office/en-US/home?category=lync
    The majority of readers here typically are end users, administrators, consultants, architects, or enthusiasts.
    Kind regards
    Ben
    Note: If you find a post informative, please mark it so using the arrow to the left. If it answers a question you've asked, please mark the thread as answered to aid others when they're looking for solutions to similar problems or queries.
    Lync | Skype | Blog: Gecko-Studio

  • How to get current assigned participant id?

    Hi mates,
    This might be a basic questions, but useful for me :)
    How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
    Below is what I tried.
    Participant.id or Instance.participant.id - returns login user id
    Thanks

    Hi,
    Please correct me if I understood wrong.
    You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
    If this is your requirement then please find the code below and make the necessary changes into it.
    Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
    In the process as well as screen flow layer make an instance variable instanceid as Int.
    Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
    Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
    Write the following code in screen flow automatic activity.
    logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
    ProcessService ps;
    InstanceFilter instF = InstanceFilter();
    ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
    logMessage("Connected");
    instF.create(processService : ps);
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //<ProessId Name> is the id of the process where you want to know the assighed participant id
    instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
    instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
    Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
    foreach (instance in instances) {
    logMessage("Assigned ?: " + instance.participantId.empty);
    logMessage("instance.participantId: " + instance.participantId);
    ps.disconnectFrom();
    Bibhu

  • Get current event in iCal

    I'm trying to create a script that would run as a trigger to set my away message in Adium to currentEventName - eventLocation
    Theoretically, my code works, and it does... sometimes. I figure there is some bug in it I'm just missing. Any help would be appreciated. Note that this has to work for for repeated items. I have cut the date off at the minute since the date and time has to be exact - unless of course you know of a way to fix this. Thanks. Below is the code.
    set myEvent to "Unknown Event"
    --gets the current date minus the time
    set curDate to (weekday of (current date)) & ", " & month of (current date) & ¬
    " " & day of (current date) & ", " & year of (current date) as string
    set curTime to round ((time of (current date)) / 60) rounding down
    set curHour to round (curTime / 60) rounding down
    set curMin to curTime mod 60
    --fixes the 0 problem
    if curMin < 10 then
    set curMin to "0" & curMin as string
    end if
    if curHour > 12 then
    set today to curDate & " " & curHour - 12 & ":" & curMin & ":00 PM" as string
    else
    set today to curDate & " " & curHour & ":" & curMin & ":00 AM" as string
    end if
    --today should now be the correct time without the seconds
    set today to date today
    tell application "iCal"
    repeat with i from 1 to count of every calendar
    if myEvent is "Unknown Event" or myEvent is {} then
    set myEvent to (summary of every event of calendar i whose start date is today)
    set myPlace to (location of every event of calendar i whose start date is today)
    end if
    end repeat
    end tell
    if myEvent is {} then
    set myEvent to "Unknown Event"
    --display dialog "No event on " & today
    end if
    if myPlace is {} then set myPlace to "Unknown location"
    set myAway to myEvent & " - " & myPlace as string
    tell application "Adium"
    set my status type to away
    set my status message to myAway
    end tell
    PowerMac G5 DP 2.0Ghz   Mac OS X (10.4.6)   1.5GB RAM, 160GB SATA HD, 160GB ATA HD (enclosure)

    Apparently, it works even faster if executed from iCal (as opposed to running with the events tab closed).
    There were a couple of minor bug fixes, but I've tested it on a fake repeated event, and will see if it really works tomorrow.
    Known bugs:
    does not work for daily
    does not work for monthly (ie, things on the third sunday)
    For now though, this is fine as almost all my things are custom weekly events.
    Here's the code:
    --Get current time, current time without seconds, and day abbreviation
    set current_date to (current date)
    set today to current_date - (seconds of current_date)
    set now to (time of (current date)) - (seconds of (current date))
    log now
    log today
    set thisYear to year of (current date) as number
    set thisMonth to month of (current date) as number
    set thisDay to day of (current date) as number
    set thisDate to characters 1 thru 2 of (weekday of (current date) as string) as string
    log thisDate
    --Init vars
    set freq to ""
    set interval to ""
    set endDate to ""
    set myEvent to ""
    set myPlace to ""
    set setBool to false
    tell application "iCal"
    repeat with i from 1 to count of calendars
    if setBool is true then exit repeat
    repeat with j from 1 to count of events of calendar i
    set rec to recurrence of event j of calendar i as string
    set curDays to my getDays(rec, j, i)
    if thisDate is in curDays then --Check if the event ocurrs today
    set endDate to my getEnd(rec, j, i)
    --If the end date is equal or greater to the current date (minus seconds)
    if item 3 of endDate ≥ thisYear and (item 2 of endDate > thisMonth or (item 2 of endDate = thisMonth and item 1 of endDate ≥ thisDay)) then
    set eventStartTime to (start date of event j of calendar i)
    set eventStartTime to (time of eventStartTime) - (seconds of eventStartTime)
    if eventStartTime is now then
    set myEvent to summary of event j of calendar i
    set myPlace to location of event j of calendar i
    set setBool to true
    exit repeat
    end if
    end if
    end if
    end repeat
    end repeat
    end tell
    try
    if myEvent is "" then set myEvent to "Unknown Event"
    on error
    set myEvent to "Unknown Event"
    end try
    try
    if myPlace is "" then set myPlace to "Unknown Location"
    on error
    set myPlace to "Unknown Location"
    end try
    set myAway to myEvent & " - " & myPlace as string
    if myAway is "Unknown Event - Unknown Location" then set myAway to "Out. Call the cell."
    tell application "Adium"
    set my status type to away
    set my status message to myAway
    end tell
    --display dialog myAway
    (* Parse Recurrence *)
    on getFreq(str)
    try
    return word 3 of str
    on error
    return ""
    end try
    end getFreq
    --Not used right now, but I feel it should be...
    on getInterval(str)
    try
    return word 6 of str
    on error
    return ""
    end try
    end getInterval
    on getStartDay(eventNum, calNum)
    tell application "iCal"
    set startDay to items 1 thru 2 of (start date of event eventNum of calendar calNum as string) as string
    end tell
    return startDay
    end getStartDay
    on getEnd(str, eventNum, calNum)
    try
    set endDate to items 1 thru 8 of word 9 of str as string
    set endYear to items 1 thru 4 of endDate as string
    set endMonth to items 5 thru 6 of endDate as string
    set endDay to items 7 thru 8 of endDate as string
    set endYear to endYear as number
    set endMonth to endMonth as number
    set endDay to endDay as number
    log {endDay, endMonth, endYear}
    on error --It isn't a recurring event
    tell application "iCal"
    set endDate to end date of event eventNum of calendar calNum
    set endYear to year of endDate as number
    set endMonth to (month of endDate) as number
    set endDay to (day of endDate) as number
    log {endDay, endMonth, endYear}
    end tell
    end try
    return {endDay, endMonth, endYear}
    end getEnd
    on getDays(str, eventNum, calNum)
    set dayList to {"MO", "TU", "WE", "TH", "FR", "SA", "SU"}
    set recDays to {getStartDay(eventNum, calNum) of me}
    log recDays
    try
    repeat with i from 12 to length of str
    if word i of str is in dayList then
    set recDays to recDays & word i of str
    else
    exit repeat
    end if
    end repeat
    return recDays
    on error
    return recDays
    end try
    end getDays

Maybe you are looking for

  • Down payment request with reference to sales order

    Hi all, I have configured a down payment scenario integrated with SD module for delivery based order. the flow is working fine when I post the down payment with transaction f-29 and insert the reference to the sales order (without item). but when i t

  • PAGES DOCUMENT TO WORD DOCUMENT.

    I don't have Word in my Macbook Air, so how can I save a PAGES DOCUMENT like a WORD DOCUMENT? Please help me! I really need this thing..~ Thank you if you answer my question.

  • Build in lenovo camera

    2 problems with lenovo camera: 1- using the camera program of lenovo EASY CAPTURE- when i change camera to lower  resolution -it is not fixed and goes back to max. resolution. WHY? how to FIX it? 2- the camera is not recognized at  control panel->sca

  • How to print to tables in ALV grid

    hi all I have 2 internal tables with some values i want to display the 2 internal tables in the grid one after another with some title can anyone tell me how to do it Thank you.

  • Macbook Pro (2012) sudden shut down, cant turn on, cant charge

    Hi all, My Macbook Pro(2012) was working well last night and i saw the battery shown at the top is showing 22%. When i plugged in my iPhone4 to it, it auto shut down. When i try to turn it on, it doesn't work. it turn to be comepletely died I thought