Checking the existence of a file b4 creating a file by the same name

Hi All,
I hav a scenario where I hav to check for the existence of a file by the same name (<b>XXXFile</b> say). If i don't hav any file by the name <b>XXXFile</b>, then i hav to create a file by the name <b>XXXFile</b> at that location. If it already exists, then i hav to wait till it gets deleted (takes hardly 1 min to get deleted).
Can any one tell me :
How to do this without using operating system command?
And using operating system command?
Any help wud be appreciated.
Thnx in Adv
Anil

Hi Anil,
You will i guess have a standard format in which you are going to write the file with a counter or something.
Whenever you are going to write a file, you can:
1. Check if there is a file already sent by this name?
2. If no, then you can send the file at the same time update the name.
You can do this by creating a ztable in SAP and accessing it through JCO/RFC. You can do this in your module or in the mapping.
eg. /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
Regards
Vijaya
Message was edited by: vijaya kumari

Similar Messages

  • Purpose: to create photo galleries to insert or not items: 1) with phocagalery, it works 2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see noth

    purpose: to create photo galleries to insert or not items:
    1) with phocagalery, it works
    2) with the transfer via lightroom, I do not see the downloaded files but if I want to create a directory folder with the same name, he said he is already, I see nothing in the media in content management
    Can you help me

    Mahsa21,
    We are glad that we were able to resolve the international calling plan issue for you.  If you need assistance,please  reach out to us.
    thanks,
    Tonya D.

  • Create a dir if there exists a file with the same name

    Hi..
    I want to create a directory with file.mkdir(). But I recognize a problem when there is allready a File with the same name.
    Is there any solution to handle a dir and a file with the same name?
    eg: Dir "C:\Windows" and File "C:\Windows"
    wami

    This explains it... use "java Test2 asdsfd" for example. While this example doesn't show it,
    if you try to create a dir with another slash on it c:\blah\ , it still can't be done.
    import java.io.*;
    public class Test2
    public static void main (String args[]) throws Exception
         if (args.length < 1){
         System.out.println("Test2 [name]");
         System.out.println("creating bogus file " +args[0]);
         FileOutputStream fo = new FileOutputStream(args[0]);
         fo.write(55);
         fo.write(55);
         fo.write(55);
         fo.close();
         File x = new File(args[0]);
         if (x.mkdir()) System.out.println("made dir " + args[0]);
         else System.out.println("failed to make dir " + args[0]);
         System.out.println("deleting file " + args[0]);
         x.delete();
         if (x.mkdir()) System.out.println("made dir " + args[0]);
         else System.out.println("failed to make dir " + args[0] + " again !");
    }

  • Unable create a target file with the same name

    Hi,
    I have to pick an attachment from a web service and place the attachment in
    a folder, with the same name (Attached File Name). I tried this using SOAP to file
    scenario. Using SOAP, I'm able to get the attachment inside PI with the same
    name, but not able to generate the file in the receiver end.
    Please let me know if this is possible or else is there any other way to do
    it.
    Regards,
    Deepak Ravi

    Check also:
    Combining three different aspects of PI (ASMA, AF Module and variable substitution) in one shot
    Dynamic Configuration vs Variable Substitution - The Ultimate Battle for the File Name
    Regards

  • Two groups with the same name in File and LDAP realms

    Hi,
    I configured WLS 6.0 SP1 to use an LDAP caching realm
    as default one. In the LDAP server (Netscape Directory)
    I have a group called Administrators. There is a group
    with the same name in WLS own File Realm. When I click
    on the Groups menu item in the administration console
    I only get the Administrators group from the File Realm
    listed. Is that expected? What will happen if I protect
    a resource ti the Administrators group? Which one will
    prevail - the one from the LDAP or the one from File
    Realm? Or maybe the two will be merged?
    Regards,
    Plamen Petrov
    AstraZeneca
    Sweden

    Hi
    First of all I want to know that where you created your class, In SE24 or in any programm.
    if in SE24, then go to se24 open that class go to methods tab and check if that method name accurs at two places, if not, then
    click on that method and check the code.
    or if in a program.
    then you must have defined like
    class <class name> definition.
    public section
    method <method name>
    endclass.
    class <class name> implementation.
    method <method name>
      code for that method.
    endclass.
    It might be possible you have set the implementation part twice for that particular method, So please check and delete one implementation for that method.
    Thanks
    Lalit Gupta

  • How do I make Applescript to compress 2 filez with the same name?

    Hello guys and thank you for reading this!
    I don't know a lot about programming, but i believe applescript can save my life. What I need is.
    Detecting 2 files with the same name, but differnt extension. (song 1.jpg, song 1.mp3)
    Compressing those 2 files into a single .zip (In the end I would have song 1.jpg, song 1.mp3 and song 1.zip
    And that's it! I know its pretty simple, and I've seen the "Create Archive" in automator, but I don't really know how to tell him which files to Compress.
    Thanks again!

    Hi,
    Try this script :
    set sourceFolder to choose folder
    tell application "System Events"
          {name, name extension} of (files of sourceFolder whose name extension is not "zip")
          my compress2FilesSameName(the result, sourceFolder as string)
          repeat with i in (get folders of sourceFolder) --check in subfolders
                {name, name extension} of (files of i whose name extension is not "zip")
                my compress2FilesSameName(the result, path of i)
          end repeat
    end tell
    on compress2FilesSameName(tList, tFolder)
          set tnames to item 1 of tList
          set tExtensions to item 2 of tList
          set tc to count tnames
          set j to 1
          repeat while j < tc
                tell (item j of tExtensions) to if it is not missing value or it is not "" then
                      set n1 to (count) + 2
                else
                      set n1 to 1
                end if
                tell (item (j + 1) of tExtensions) to if it is not missing value or it is not "" then
                      set n2 to (count) + 2
                else
                      set n2 to 1
                end if
                set name1 to item j of tnames
                set name2 to item (j + 1) of tnames
                if (text 1 thru -n1 of name1) = (text 1 thru -n2 of name2) then -- same name
                      set tFile1 to quoted form of POSIX path of (tFolder & name1)
                      set tFile2 to quoted form of POSIX path of (tFolder & name2)
                      set zipFile to quoted form of POSIX path of (tFolder & (text 1 thru -n1 of name1) & ".zip")
                      do shell script "/usr/bin/zip -j  " & zipFile & " " & tFile1 & " " & tFile2
                      set j to j + 2
                else
                      set j to j + 1
                end if
          end repeat
    end compress2FilesSameName
    if an archive already exists with the same name (in the parent folder of the files to compress) , the ZIP command overwrite this ".zip" file.
    Example  with "song 1.jpg", "song 1.mp3" and "song 1.zip" :
    If "song 1.zip" doesn't exist, the ZIP command create the "song 1.zip" file.
    If "song 1.zip" exist, the ZIP command overwrite the "song 1.zip" file (it will not create a new archive).

  • '"Connection Failed" : The server "rrnas01" may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again' message

    '"Connection Failed" : The server "rrnas01" may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again' message keeps displaying whenever I try to open any Adobe CS5 applications (except for Adobe Acrobat Pro). It displays until I click "OK" about 15-20 times or so and then will finally let my program open.
    I have tried deleting files within my Library/Preferences folder and turning off/deleting login items within my system preferences as other forums suggested but nothing happened. Spending 3.5 hours on the phone with Adobe and completely uninstalling and then reinstalling the entire CS5 Master Collection didn't work either.
    Also, it may be helpful to know that my programs worked fine for about three weeks then when we got internet and changed the password (the join, not the adminstrative password) with the wireless network "ScubaSteve" (which I've used with no problems at my old apartment) it started acting up. I have never seen "rrnas01" before so I don't know at all where it came from. I also installed the free 30 day trial of Suitcase Fusion 3 recently, but thinking that could also be the cause I have uninstalled it, and still no help.
    Please help me! And please keep in mind I don't know all the computer lingo that a lot of the people in these forums seem to know. Thanks in advance for ny help you can give me.

    It may not be possible .. there is a major bug between Mountain Lion and the TC where the TC disk goes off the radar of the computer.
    Lion is also affected but not as badly.
    7.6.4 seems worse than earlier firmware.. so back to 7.6.1 or 7.5.2 if that is possible.
    Obviously that is not a solution for a later Gen5 TC.
    Reset to factory after the firmware downgrade. .use all network names that are short, no spaces and pure alphanumeric.
    If the TC is the main router set the dhcp to a very short lease time.. eg 30min.. and see how it goes, or try a longer lease like 99days.
    I prefer the very short lease but response has been mixed.
    Use ethernet not wireless.. ethernet is always more reliable and stable than wireless.
    And last .. a nightly electric timer that powers off every night at midnight for 1min.. would not be the first device we have suggested a fix that amounts to beat the unit to the punch by forcing it to reboot since it is unstable.

  • How to create reports servers with the same name in two nodes in Reports

    Greetings
    We are migrating Oracle Application Server 10g (9.0.4) to a better hardware infrastructure with high availability. We want to provide 2 new Oracle Application Server 10g (9.0.4) in High availability and we want to avoid modify the existing forms and reports code, but the code is looking for a specific reports server name when calling reports, but I couldn't create the same reports server name in the both oas machines, I could create the reports server in only one node. I want to create a reports server with the same name in both nodes but it is not possible. I know that there is a procedure to do that in 10.1,2 (Note 437228.1, How to Create Two Reports Servers With the Same Name in the Same Subnet) but I couldn't find the equivalent procedure in 9.0.4.
    Anybody kwows how to create a reports server with the same name in two nodes using 10g (9.0.4)
    Thanks
    Ramiro Ortiz.

    Hello.
    I applied the patch 4092150 on my oas 9.0.4.2 and I modified my rwnetwork.conf file changing the port to 14022 by following the note "How to Create Two Reports Servers With the Same Name in the Same Subnet? [ID 437228.1]" but I am facing the same error rep-56040 "server already exists in the network".
    When I run osfind command I get the following information (My reports server is senarep and I want to create it on SNMMBOGOAS10):
    osfind: Found 2 agents at port 14000
    HOST: SNMVBOGOAS10.sena.red
    HOST: SNMVBOGOAS09.sena.red
    osfind: There are no OADs running on in your domain.
    osfind: There are no Object Implementations registered with OADs.
    osfind: Following are the list of Implementations started manually.
    HOST: SNMVBOGOAS10.sena.red
    REPOSITORY ID: IDL:oracle/reports/server/EngineComm:1.0
    OBJECT NAME: senarep2
    REPOSITORY ID: IDL:oracle/reports/server/ServerClass:1.0
    OBJECT NAME: senarep2
    HOST: SNMVBOGOAS09.sena.red
    REPOSITORY ID: IDL:oracle/reports/server/EngineComm:1.0
    OBJECT NAME: senarep
    REPOSITORY ID: IDL:oracle/reports/server/ServerClass:1.0
    OBJECT NAME: senarep
    Any Ideas?

  • How can I overwrite a file with the same name in Content DB?

    Hi All,
    In Content DB if I upload a file with the same name as a previous one, the application shows the warning message:
    " ...You cannot upload "XXXXXX.doc" to "Test 1" because an item with the same name already exists ..."
    And the alternatives are "Create Version" or "Cancel" the operation. Is there any way to overwrite a previous file as we can do it in Oracle Files ?
    Regards
    Harvey

    Hi All,
    Can anybody from the Content DB product development answer this question?
    Regards
    Harvey

  • Bug with workflow that creates a folder and sub folder with the same name.

    Hi,
    I've found a possible bug in SharePoint 2010 workflows. I only have access to SharePoint 2010 and SharePoint Designer 2010 over my companies intranet, afaik I don't have access to to logs or anything server side so sorry for the any missing information.
    I had some problems with a workflow in one list that needed to create some folders and subfolders in a second list. The production version did a lot more so I setup a test area with 1 list and a workflow that only does the folder creation part and have managed
    to consistently replicate this problem.
    The test list has two columns, [title] and [sub folder title]
    The workflow starts by getting the values for [title] and [sub folder title] into variables.
    It then creates a folder in the same list with the same name as [title], and then creates a sub folder under this with the name from [sub folder title]
    So the resulting structure would be:
    Test List:-
        List item with fields [title] and [sub folder title]
        [folder: title]:-
            [folder: sub folder title]
    If both folder names are different (e.g Folder1 and Folder2) then it works perfectly fine, if both folder names are the same (regardless of character case, e.g. samefolderName and sameFolderName) then the workflow fails.
    As part of the test i made the first action of the workflow to log the message "Workflow Started" to the history list. When the workflow fail there's nothing logged in the history list other than the error: "The workflow could not update the
    item, possibly because one or more columns for the item require a different type of information."
    Creating a sub folder with the same name as it's parent works fine manually but for some reason a workflow can't seem to do it in one action.
    As there's no history list entries before the error it looks like the workflow is just failing to start but if i do something like add an if statement to check if [title] and [sub folder title] are the same, and only create the subfolder when they are not
    then it runs fine doing what it's set to.
    The function of the workflow in our office was for convenience so were just working without it. Just wanted to post to see if anyone else has come across this/could try to replicate or explain this  and see if it's a SharePoint bug or something specific
    to our setup.
    thanks,
    Martin

    not sure about the specifics of your workflow, but if you're querying the list for the folders... keep in mind that a list lookup will only ever bring back ONE item... even if there are several items that meet the filter criteria... example: if i search
    a list for an item assigned to "john doe", there may be 15 tasks that meet the criteria, and it'll only grab one... this is why SP Designer WARNS you when your list lookup may exhibit this behavior.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • When I check my boot SSD drive using Disk Utility under Mavericks, I often get "Incorrect number of extended attributes" errors.  But if I boot off an external drive and check the same SSD, no errors are reported.  Is this a bug in Mavericks?

    When I check my boot SSD drive using Disk Utility under Mavericks, I often get "Incorrect number of extended attributes" errors.  But if I boot off an external drive and check the same SSD, no errors are reported. 
    This happens not just with the SSD in my Mac Mini, but with another SSD in my MacBook (both now running Mavericks).  So far as I know, all of the kit I am using is in good order (despite the file corruption reports).  So I am beginning to wonder if it could be due to a bug in Mavericks?  Both SSD drives have been formatted to MacOS Extended (journaled) format.  Should I have used a different format, I wonder?
    Has anyone else encountered this issue?
    Does anyone have a solution?
    Or an explanation that might help my investigation of the issue?
    Thanks guys,

    I understand that the Corsair Force 3 is not one of the SSD drives that are supported on Apple Macs. 
    I did try downloading and using Trim Enabler, but the error message came up both when it was off and when it was on.
    I understand that not everyone thinks Trim Enabler is a good program, though there is a new version out now, so I may give it another try.

  • My goal: "convert into pdf" -- the file is instantly saved with the same name as pdf. feasible?

    Good evening dear experts,
    i use Adobe Acrobat 9 pro extend to convert word, ppt, jepgs etc. into pdfs.
    No if i
    1) convert a ppt into a pdf: it asks --> "save as" --> converts --> opens the file
    2) convert a jpeg into a pdf: it instantly --> opens the file as pdf --> i need to save it manual under "save as"
    In both cases i want to
    my goal: "convert into pdf" --> the file is instantly saved with the same name as pdf
    WITHOUT asking me "save as" + "opening of the file".
    Is the possible, and if yes, HOW ?
    A fast answer is very very much appreciated, for i have to convert hundreds of files tonight in order to get it into 1 pdf
    Thx and greetings from Germany,
    Julia

    We are nearly there!
    A] - righclick "convert-to-method": @Bill: thx again, your approach worked for ppt, doc-files etc.
    2 problems:
    1) exception: for jpegs/bmps it doesn't work (the file is still opened after conversion, strange).
    2) the output-folder. it only accepts the standard "output-folder documents/*.pdf" (which is a step further but not my end-goal). If i choose another output-folder via "browse", this setting is NOT SAVED (even after clicking on "accept" + "ok").
    my goal: the the file should be automatically saved in THE SAME folder the original file is in (seems that can't be achieved and the standard folder is the only thing where to convert in?).
    Personal background for understanding: i have many folders with several ppts in it. Once i send it out to a customer, i always have to convert it into a pdf. thats why i want to save time (i know that i can convert it directly + send per mail, but i want an up-to-date copy of the pdf in the folder as well).
    B] - "the automated solution"- @Sandeep:
    i just watched your link http://tv.adobe.com/watch/acrobat-tips-and-tricks/automating-tasks-in-acrobat/
    about batch processing and i think its really helpful if i want to convert ALL of the files in one folder.
    1 question regarding this: are the subfolders also affected?
    As i understood from the video, i choose 1 "watched folder" and a "destination folder" (can be the same). E.g i have 1 big folder "designs" with many subfolders. I create a batch converting ppts to pdf to "the same folder" Once i run my batch, it converts ppts in the chosen folder "designs" + all subfolders into the same folder, right?
    If this is the case, i get too many pdfs, for i only need the latest ppt-version to be converted (copies of old ppts are also in the files) ;(.
    Do you have an idea how can i solve this?
    Now we are very near to the end-solution of my goal:
    i need this option "to the same folder" in my general settings when i convert a file via right-click. ATM it only works with the standard-folder documents/*.pdf
    In A], my files are now instantly saved with the same name in 1 specific folder. I would be completely happy, if this folder would be alwys the same as the one with the original file (and not 1 specific folder)
    2nd problem with a]: it does not apply to picture files (bmp, jpegs..)
    So if we could solve this, i would be a completely happy girl
    Guys, you are great, thx again for the whole struggle with my concerns!!

  • For each loop in case of more file with the same name

    Hi, guys how works ForEachLoop in case of double file? Let's say that we got five excel file. A.xls, B.xls, C.xls, D.xls, A.xls. We got two file with A.xls. I'm going to assume that both file will be loaded. It's correct? 
    I'm asking this because I need to check if I got two file with the same name ( I got hundreds of file to load). And in the same time I need to avoid to load two file with the same title ( cause I could double the data)

    If there are duplicate file names in subfolders then you should fill the variable with the complete path. See C in this images:
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • The same file with the same name need to call two RFC's with the sequence

    i have to pick up the same file with the same name  and call the two RFC in sequence
    scenario.i have xxx.txt file.file should be proces first calling the first rfc .
    I created two different communication channels
    for the first sender file communication channel i should not use processing mode archive,delete,Test
    and only option is set read only.
    if i set the read only the file ..then i can not use the same file again to call second RFC.
    how we can acheive the above scenario?
    Regards,
    Hyma

    If you want to file need to be picked up twice in same folder, it seems it is hard for PI adapter to achieve it, you should look for API's that control adapters availibility.
    But if you have different folder, then it make your scenario simpler since you can process first time, then output to another folder, configure another adapter to pick up from different folder.
    Regards
    Liang

  • When saving files under options the file name is duplicated how to remove extra folder with the same name

    Under Firefox Options I clicked Saving Files under Downloads but the file name appears twice and an extra folder with the same name is created within the folder i.e.:
    G:\Akbar's Songs\HAMARA FORUMS DOWNLOADS\HAMARA FORUMS DOWNLOADS
    As you can see the folder is repeated, how can I correct this?
    Also the music files I download from a site downloads as WinRar file and I need to open it. Is there an option where the files open automatically in the folder I have selected?
    Many thanks for your help.

    The "beta" version is for testing and may be more prone to problems, so I suggest trying the regular version (9.20) even though it hasn't been updated since 2010.

Maybe you are looking for

  • How do I transfer my photos to my ICloud from my Facebook photos to my ICloud?

    How do I transfer photos from my HTC phone and from Facebook on my Mac Pro to my ICloud account??  I'm very confused. Thanks for the help.  -Mark

  • Transformations (Migration)

    Hi, Friends... We have 2LIS_12_VCITM DataSource and using for Delivery Item Data DSO/Cube. Previously somebody installed and using in BW 3.5, after that we migrated DataSource to BI 7.0. using RSDS, now I created Transformations form DataSource to DS

  • Hard drive runs wild when I put to sleep??-Why

    Hi, I have a 1 yr old MacBook Pro w OSX 10.5.1. I boot it up at home, plugged in, and use it for about 90 minutes. When I leave, I put it to sleep and shut every thing else, like the monitor, etc down and pack it up. I make sure I "eject" any externa

  • Icloud Control Panel and Windows XP

    I want to use icloud control panel to upload my phones from my ipad to my computer, but I have Windows XP and Control Panel 3.0 won't work with Windows XP.  How can I do this with my current version of Windows?

  • I lost my contacts i need help please

    I dont know how i lost my contacts! I have tried backing up my phone but still no contacts, Ive tried turning my contacts off and merge and then turn it back on and nothing. I can find all my contacts on icloud.com but i cant sync them to my phone ca