SPD 2010 - How to know if a file with a given name already exists in a document library

I've created a workflow using SPD. One of the steps in there is changing the name of the document to a clean name. This workflow fails if a document with this same name already exists in my document library. Is there a way to check in a SPD workflow if
a document with a given name already exists in my document library ?
Marc Nemegeer

According to your post, my understanding is that you wanted to know if a file with a given name already exists in a document library.
You can use a SharePoint Designer workflow to achive it.
To test to see if a document exists, you need to use condition:
If Current List:Name  equals  [%Current Item:Title%].docx
Here is a similar thread for you to take a look at:
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • 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 ?

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

  • When deleting messages I get this message:"74608.emlx" couldn't be copied to "Messages" because an item with the same name already exists.  How can I fix this problem?

    When trying to delete messages in mail, I've been getting this message:“74608.emlx” couldn’t be copied to “Messages” because an item with the same name already exists."  The numbers at the beginning are always different but the ".emlx" and the rest of the statement is always the same.  How can I fix this problem?

    HT2500 Error when deleting email: Apple Support Communities

  • How to output a postscript file with .ps extension name in jsp?

    I could use a servlet to output a postscript file with .ps file extension name. But I tried to do the same with jsp, for some reason, jsp always outputs a file with .jsp extension name though the content is postscript. Could anyone help me on this? Here is my jsp code:
    <%@page contentType="application/postscript"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.util.*" %>
    <%@page import="java.io.*" %>
    <jsp:useBean id="corresv" class="oiintranet.CorresVBean" scope="request"/>
    String corresId = request.getParameter("Id");
    PrintWriter output = response.getWriter();
    output = corresv.getResult(output);
    In the bean corresv:
    public class CorresVBean extends BaseBean {
    private String corresId;
    public void setCorresId(String s) {
    this.corresId = s;
    public PrintWriter getResult(PrintWriter output) {
    //get postscript file content from a socket, one string line each time until reaches "X_END"
    String str;
    while ((str = in.readLine()) != null) {
    if (str.equals("X_END")) break;
    output.println (str);
    }catch(Exception e) {
    return output;
    Thank you in advance.

    Every time u want to make a file u need to make its extension. I am talking
    about general scenario like word, excel so even when u make spool file
    so u need to give extension.
    Spool temp.sql
    it will save u r file as sql file.
    hope it will help

  • How to save an XML file with a proper name and how to maintain the history?

    Hi All,
    As per the requirement, I have to remane the name of the XML file which is under the KM repository Userhome/personaldocuments based on the user logon information.
    I have created a Repository service for the same and following is the code for the same. The service is working, but only for the first entry in the XML form. Second onwards, the file does not get remaned to the preferred one.
    Request you to throw some light as what is wrong or missing in the code, so that I can follow the right approach. Many thanks in advance.
    // Code snippet is here//
    //Starts here//
    com.sap.security.api.IUser epUser;
                                            epUser = UMFactory.getAuthenticator().getLoggedInUser();
                                     String EntID = epUser.getUniqueName();
    IResourceContext resContext = null;
    try {
         resContext = ResourceFactory.getInstance().getServiceContext("cmadmin_service");
    } catch (ResourceException e1) {
    RID rid = RID.getRID("/userhome""/"EntID+"/Personal Documents");
    IResource resource = null;
    try {
         resource = (ResourceFactory.getInstance().getResource(rid, resContext));
    } catch (ResourceException e2) {
    ICollection collection = (ICollection)resource;
    IResourceList resourseList = null;
    try {
         resourseList = collection.getChildren();
    } catch (AccessDeniedException e3) {
    } catch (ResourceException e3) {
         for(int i=0;i<resourseList.size();i++){
              IResource res_new = resourseList.get(i);
                try {
              } catch (NotSupportedException e) {
              } catch (AccessDeniedException e) {
              } catch (ResourceException e) {
    //Code ends here//
    Edited by: DIPENDRA MOHANTY on Jun 5, 2009 5:20 PM

    The code seems ok.
    But you have mentioned about a KM Rep service, what service is that? which event it is listening to?

  • "91590.emlx" couldn't be copied to "Messages" because an item with the same name already exists. How do I fix this?

    The delete button in Mail gives me this message: “91590.emlx” couldn’t be copied to “Messages” because an item with the same name already exists. The only thin that has changed is an OS update last evening. (Mountain Lion)

    Thanks...it was spooky seeing the mail in my box suddenly disappear and blank after going to Mailbox and Rebuild.  But "poof" it was up again and was able to delete without the messages telling me it had a duplicate in trash (which it did).  Solved the problem.

  • How to put two files with the same name into the same folder?

    How can I put two files with the same name and the same extention into the same directory?
    Is this even possible?
    Thanks in advance. 

    Are you sure? I would be very surprised if that was the case.
    How does the computer/filing system differentiate the files, if not by their names?
    How do you tell the computer which one you want? (On the command line.)

  • How to check-in multiple files with same name having different revision num

    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.

  • When clicking "Save image as" how can I get Firefox to auto add a (1) (2) etc at the end of the filename if an image with the same filename already exists?

    How can I get Firefox to automatically rename images when clicking "Save image as" on the menu, when an image with the same file name already exists in the folder??

    That is not a feature that is supported natively within Firefox but there are various add-ons which I think will do the job you need.
    The one I have used is [https://addons.mozilla.org/en-US/firefox/addon/web-slide-show/?src=search Web Slide Show]. This is primarily an add-on for viewing a slideshow of images when they are presented as thumbnails on a web page. However once you are in the slideshow there is a download button which will download all the images in the slideshow. It will automatically rename the images if an image with the same name already exists in the folder.
    If you don't like that add-on then here are some others that may do the same job:
    * [https://addons.mozilla.org/en-US/firefox/addon/image-download-%E2%85%B1/?src=search Image Download II]
    * [https://addons.mozilla.org/En-us/firefox/addon/image-picker/ Image Picker]
    I hope that helps. Let me know if not.
    Also I notice that you are using Firefox v23. That is now an outdated version. To get the latest security updates I suggest updating to version 24. See the support article here: [[Update Firefox to the latest version]].

  • Project Server 2010 and Report Builder 3 : the same name already exists

    I created my first report in Report Builder, and,
    although it's not perfect, I tried to save it. But I get the error :
    Impossible to save the report "No title.rdl". A file from another type with the same name already exists".
    I tried to change the name 5 times but I always got the same error.
    Any idea ?

    Hi WLID,
    I have taken a sample test in my environment, it works well. If there is already another type file named “No title” on report server, then it can be saved on report server. If there is already a report named “No title” on report server, then it would prompt
    that “An item named ‘http://servername/reportserver/foldername/No title’ already existed. Do you want to replace the existing item?” when we want to save the report in the same folder.
    What’s the location that you want to save the report? Is it a report server or others? Could you please provide us more information about the issue? You can try to reopen the Report Builder, then create another simple report to text the issue again.
    Hope this helps.
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to know if a file has been updated in iCloud after modification?

    How to know if a file has been updated in iCloud after modification?
    I work on various app including Keynote on my Mac Pro. And after modification, i close file and I wait.
    When I see no more Internet traffic. I assume that keynote has uploaded all the works I have done into iCloud.
    But when I open the same file on my iPad on the way to work. I do not see the file updated.
    I assume that I did not wait long enough.
    I wished I had a way to enforce the updated file to upload and way to get confirmation that it has been completed.
    In windows I simply push the sync button.
    But for iCloud I do not yet see anything like that.
    Please help.

    you would be better served asking this in the iCloud discussion, where users are more knowledgeable about iCloud. Replies on iOS and iCloud issues are usually unanswered here because of our lack of knowledge.

  • Mac Book Pro 2010- how do I change MPG files on desktop to use on I Movie

    I have a MacBook Pro 2010  - how do I change MPG files on desktop to use in IMovie

    Transfer the movie from your iPad to your MacBook then. =)
    iOS: How to transfer or sync content to your computer

  • How to know whether a file is opened  or not ?

    Hi all,
    How to know whether a file is opened by its editor or not ? File may be any of the type.

    There are platform-dependent commands that tell whether a file (or directory, port etc.) is used by which processes.
    [[email protected] ~]$ fuser .
    .:                    9299c
    [[email protected] ~]$ ps -p  9299 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    9299  9298  0 Apr25 pts/0    00:00:00 -bash
    [[email protected] ~]$ ls -l $fn
    -rw-r-----  1 oracle oinstall 111215876 Apr 25 19:05 /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1
    [[email protected] ~]$ fuser $fn
    /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1:  3746  3747  3748  3749  3750  3751  3752  3753  3754  3755  3756  3758  3761  3762  3765  3767  3769  3770  3771 18638 21605 21743 21744 21745 22140 22143
    [[email protected] ~]$ ps -p 3746 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    3746 26427  0 Apr23 ?        00:00:01 /opt/oracle/product/AS/10g/R2/jdk/bin/java -server -Djava.security.policy=/opt...

  • How to convert a pdf file with hand-written signature?

    How to convert a pdf file with hand-written signature?

    Hi Lotus1215,
    Once the document is signed we cannot edit that document, hence convertion is not possible
    Please see the article mentioned below
    Let me know if you have any other question.

  • 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!

    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
                      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
                      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
                      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).

Maybe you are looking for

  • WIA service not started

    Hi, I tried to Scan from Photoshop and this mesage prompted "No WIA compatible devices were detected. Check that your devices is plugged in...". I found that the Windows Imaging Acquisition is not started in the services.msc list. What's the issue he

  • Dreamweaver MX 2004 hangs at start on new Mac Mini OS X 10.5.5

    Dreamweaver MX 2004 hangs at start on Brand New Mac Mini OS X 10.5.5. Mac Mini is brand new, right out of the box. Fresh OS. I try to start Dreamweaver, and it hangs, and then the Problem Report comes up with the attached info. I've uninstalled, down

  • Disable column when in edit mode 2

    Hello experts, some time ago I posted the thread: Editable ALV: Check Entries in order to disable an ALV grid column for user input. How can I disable the column even if the user adds a new row to the editable ALV Grid control? and How can I show in

  • Bridge CS4 very busy doing nothing?

    Recently noticed that while in the background, BridgeCS4 uses quite a bit of resources: Processor usage between 110-150% on a Dual G5. At first I thought it might be building previews or something like that, but it looks like it's doing the same when

  • Servlets and their instance variables

    I understand that for every request to a servlet, a new thread handles those requests. So it's one request, one thread. But how about instance variables of a servlet class? Are they also one instance variable per thread/request or just like the servl