Delete file from folder only (not from list)

Hi all,
I've searched a lot and didn't succeed so far, that's why I need your help. In a cloud context, I'm actually creating and uploading files (pdf and/or xml files) "on the go" to sharepoint folders via the SOAP API and this is perfectly working. But
in a cloud context, I also need to decomission services which is translated into deleting files into Sharepoint.
That's where it became complicated, because according to the API we cannot delete files if they are not part of a list structure, which is not my case. Is that true ?
The only info I have when trying to delete a file via the SOAP Api is : its name, its folder, and the endpoint where the folder is. So my question remains simple I guess : is this possible ? If so, how to (a link to the SOAP body would be usefull)
Thanks a lot
Regards
Baptiste

Hi,
According to your post, my understanding is that you want to delete file from folder.
In SharePoint 2010, It is recommended to use Client Object Model to achieve it, the following code snippet for your reference:
string siteURL = "http://siteurl";
ClientContext context = new ClientContext(siteURL);
//specific user
NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
context.Credentials = credentials;
Web web = context.Web;
context.Load(web);
context.ExecuteQuery();
string relativeUrl =web.ServerRelativeUrl +"/DocumentLibraryName/FolderName/FileName";
File file = web.GetFileByServerRelativeUrl(relativeUrl);
context.Load(file);
file.DeleteObject();
context.ExecuteQuery();
If you still want to use SOAP API, we can use the UpdateListItems method under Lists web service to achieve it.
http://www.dhirendrayadav.com/2010/06/delete-list-items-using-web-service.html
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/61466984-1844-48a1-8c1e-1c59a0f9876a/move-and-delete-files-remotely-using-sharepoint-web-services-?forum=sharepointdevelopmentlegacy
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support

Similar Messages

  • Selective Deletion from Infocube Only (Not from Aggregates)

    Hi,
    For the Selective Deletion, i used the FM 'RSDRD_SEL_DELETION' in program. But this FM deletes the data first from Infocube then from aggregate.Because of this, deletion took more time to delete and adjust the Aggregate.
    I need an way in which i can delete the data from Infocube only and after i reach to my reconcile period then i will deactivate and actiavted the aggregate, so the data will be consistent in Infocube and aggregate.
    is there any to Delete(Selective Deletion) the data only from the Infocube not from its aggregate (for the Performance Point of View)?
    Thanks in Advance.
    Regards,
    Himanshu.

    Hi
    You can try manual selective deletion which will delete data from cube only. check out the below thread.
    steps fro selective deletion for cubes and ODS
    If you want to delete data from FM only, then try to deactivate your aggregates before you start your selective deletion.
    Once deletion is done, you can reload the aggregates
    Regards,
    Venkatesh

  • Deleting email from Iphone only not from gmail account

      I have business emeails that come through on my Iphone.  I want to delete them from my Iphone only.  Not delete them totally from gmail.  Can not find a way to do that.  What am I doing wrong?

    You can do this when accessing the account as a POP account on the iPhone only with the correct settings for not removing messages from the server when deleted from the iPhone - if Gmail supports accessing the account as a POP account.
    Accessing the account as a POP account with an email client on one computer or mobile device and as an IMAP or Exchange account on another can cause problems.

  • TS4153 few files and folder are not deleting from trash folder

    i am trying to delete all files and folders from the trash folder by clicking  empty securely, but its not deleteing the files anf folder. please suggest how to clean the trash folder by deleteing all the deleted files and folder.

    Securely deleting items in Trash writes Zeros over the data so that it is completely eradicated.
    This will take quit a long time depending on how much data you have in Trash.
    Unless there is data that needs to be rendered unrecoverable in the Trash, you could choose to just delete the files and folders with out the secure option.
    Once you have Emptied the Trash unsecurely you can always use disk utility to Securely Erase Free Space on the Drive.

  • Please help I just accidentally deleted a very very important note from my "Notes" on my iPhone 4s.  How can I get it back? Is there a "Trash" file somewhere for deleted notes?  Thank you, Susan

    Please help I just accidentally deleted a very very important note from my "Notes" on my iPhone 4s.  How can I get it back?
    Is there a "Trash" file somewhere for deleted notes?
    Thank you,
    Susan

    Had you never backed up the phone before? When you saw the iTunes logo and cable, the device was in recovery mode. The data was already lost. The only way to recover from that is to restore the device, which will delete all of your data. You will only be able to restore to your last backup, whenever that was. Sorry this happened, but this highlights the importance of doing regular backups. The backup is the only protection you have against a problem like this.

  • Want to delete mails from Thunderbird but not from the server?

    Hi,
    Please tell me how to configure the settings of Thunderbird so that if i delete any mail from Thunderbird that mail would be delete only from Thunderbird not from server. I'm using IMAP configuration for all my mail accounts and I'm using Thunderbird in my laptop and tablet both.
    Currently i'm using Thunderbird 24.4.0 and i just want to delete my useless mails from Thunderbird but not from the server without using pop-3 settings.
    Actually the reason for this Question arises because whenever i use to uninstall and reinstatement Thunderbird, i use to take "profiles" as a back up and its size is increasing day by day that is making a big issue to me as i cant take a back up of such a big size file.

    Imap mail accounts keep the emails on the server and you see a remote view of those emails and folders.
    When you subscribe to see a folder, the headers are downloaded, when you select an email to read, the entire folder is downloaded to a temp cache facilitating quicker access. If you synchronize folders, then a copy of that folder is downloaded to an mbox file in your profile, so that you have a copy of the server folder. When you make any changes to a synchronized folder, read an email, delete or move etc, then Thunderbird will resynchronize with the server to update the server. A synchronized folder allows you to work in 'offline' mode and this is the best time to perform a backup as you know there is a temporary stop on synchronizing as you are offline. They will resynchronize when you go back into 'online' mode.
    So, with IMAP mail accounts, the folders you see in Thunderbird are the same folders on the webmail server. If you make any changes via Thunderbird or webmail then you are changing the same folder. You cannot delete an email without deleting it from the server, they are one and the same.
    What you can do is move/copy an email into Local Folders and delete the one on the server. The Local Folders emails are kept in your Profile on your computer, these folders/emails are not on the server, unless you chose to keep a copy of them on the server.
    Pop mail accounts cannot see the folders on the server. They only access the server Inbox folder and download emails not previously downloaded to the mail account Inbox in Thunderbird. These emails are kept on your computer in your profile folder. You can select to keep a copy on the server or not. You can choose to delete emails off your computer and off the server or not.
    If the mail account is gmail , have you subscribed or even synchronized to see the 'All Mail' folder ? Gmail's all Mail folder is their Archive folder, it keeps a copy of all of your non-deleted emails. So, you do not need to subscribe to see this folder as it only shows you what you can already see in other folders. It doubles the disc space.
    Please read section on 'All Mail' at this link.
    * http://kb.mozillazine.org/Using_Gmail_with_Thunderbird_and_Mozilla_Suite
    You do not have to download/synchronize the entire folder. You could select to only synchronize the most recent xx days of emails.
    see info here:
    * https://support.mozilla.org/en-US/kb/imap-synchronization#w_configuring-synchronization-and-disk-space-usage

  • I have a folder and 3 files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked?

    I have an empty folder and 3 .jpg files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked and I have full read & write access.  Grateful for any assistance in solving this problem.

    Back up all data.
    Triple-click anywhere in the line below to select it:
    ls -@Oaen De* | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

  • Delete contacts from icloud, but not from iphone

    I want to delete all my contacts and calendar appointments from iCloud, but not from my iphone, and i still want to have iCloud turned on in the future.
    I have tried to delete the iCloud account from my iphone but when i log in to iCloud.com from a computer the contacts are still there even though i deleted the iCloud account.
    How do i remove these things only from iCloud?

    I fixed it, i had to turn off the syncing of the contacts and the calendar on the phone and then delete them from iCloud. Obviously if i turn on the syncing of these items again the contacts and calendar appointments will reappear in iCloud.
    So problem solved.

  • Delete Apps from MacBook but not from iPhone

    How can I delete Apps from iTunes but not from iPhone 3GS when I Sync them? The moment I delete the Apps from iTunes and then sync iPhone, iPhone deletes them as well.
    Please assist.

    If you intend to ever sync your phone with your Macbook then you can't delete the app from your Macbook, otherwise the apps will also delete from your iPhone (as you've discovered).

  • HELP: How do I print a photograph from my computer (not from a memory card) with photo quality ?

    HP6510 print-scan-copy-web (All-in-one) ePrint wireless
    Mac OS X 10 6.8
    How do I print a photograph from my computer (not from a memory card) with photo quality ? 
    Is there a software that enables me to let the printer know that what I am sending to print is a photograph and not, for example, a document?
    I sent a photograph to print from I-Photo and from Photoshop and the printer prints it like a document, that is to say, quickly and with very poor quality...for what is a PHOTOGRAPH.
    I bought my print yesterday in Spain and Monday I must turn in a printing job at work. Pleas help. (Today is already Saturday.)
    Thanks

    In OSX when you go to file and print you will usually get a window that pops up with print settings.
    In 10.6 it may only show you the printer to use, and the preset to use, but you can click the square to the right of that with a triangle in it to view more options.
    From here there is a drop down for paper type/quality, where you can select photo paper, and a higher quality, then go to print.
    The following link will actually show screenshots of these settings and how to navigate them:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01662562&tmp_task=useCategory&cc=us&dlc=en&lang...
    Jon-W
    I work on behalf of HP
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    Click the KUDOS STAR on the left to say “Thanks” for helping!

  • Full page prints from iPhone but not from iPad using photo app with AirPrint ?

    Full page prints from iPhone but not from iPad using photo app with AirPrint ? iPad only prints 4x6 on full size paper. It's an HP 8600.

    I also have this problem printing photos from an iPad to an Epson WF-2540 printer. It prints only 4x6 and without border (so print starts at extreme top left corner of paper). Borderless printing is not selected on printer. Printing a square photo just crops to 4x6 size.

  • Part of Photoshop isn't functioning.  Under adjustments, when HDR toning is clicked on I get a code:  Error 48: File or folder does not exist.  Line:11  - $.evalFile(g_StackScriptFolderPath   "StackSupport.jsx");  How can it be fixed?

    The phone company was here working on something while I was gone.  They sat down at my computer (iMac) and since then HDR toning doesn't work.  Get the code:   Error 48: File or folder does not exist.    Line: 11     ->  $.evalFile(g_StacScriptFolderPatch + "StackSupport.jsx");   How can this be fixed?   

    Go to //Applications/Adobe Photoshop [Version]/Presets/ Scripts/Stack Scripts Only/ and see if StackSupport.jsx is there. If it is not, uninstall and reinstall Photoshop to have it added back in. If it is there, first try recreating the Photoshop Preferences (hold down Command+Option+Shift while launching Photoshop).

  • HDR Toning Error 48: File or Folder Does Not Exist

    After migrating to a new computer HDR Toning is no longer available.
    I get a pop-up: Error 48: File or Folder Does Not Exist
                             Line 11  -> $. evalFile(g_StackScriptFolderPath + "StackSupport.jsx");
    What's the fix for this, if anyone knows?
    Thanks.

    Go to //Applications/Adobe Photoshop [Version]/Presets/ Scripts/Stack Scripts Only/ and see if StackSupport.jsx is there. If it is not, uninstall and reinstall Photoshop to have it added back in. If it is there, first try recreating the Photoshop Preferences (hold down Command+Option+Shift while launching Photoshop).

  • Upon start up I get a start up disk full message and to delete files, now I only get a a blue screen on start up. How to I get past the blue screen and how do I delete files?

    Upon start up I get a "start up disk full message, delete files". Now on startup I only get a blue screen. How do I get past the blue screen and how do I delete files.

    That;s really not enough free space... you can use a tools such as OmniDiskSweeper to find out where your large files reside and begin pruning (or copying to an external if they're files that you want to keep).
    One thing is certain - if you're going to continue your current usage you're certainly going to need to install a larger boot drive.
    Clinton

  • Standard Memo Lines read account from Transaction type not from memo accoun

    Standard Memo Lines read account from Transaction type not from memo account
    Is There Away To Readed From Memo lines account
    Facts:
    Define New Standard Memo Lines with Name "Discounts"
    With Type: Line
    Revenue Account: 01.0.000.0000.000.411001.0000
    Active Date: 01-JAN-2007
    When I create transaction with class Invoice
    I select the transaction type, and select customer
    I press on line items button
    I open the list description I select the "discount" define as memo line, I save the transactions
    I press on the Complete Button
    After that I navigate to Distributions button
    I found the account affect not read from account define for memo lines. It read from revenue account define in transaction type
    Especially when I use memo lines, how to read revenue account from account assign to memo lines not from transaction type

    Standard Memo Lines read account from Transaction
    type not from memo account
    Is There Away To Readed From Memo lines account
    Facts:
    Define New Standard Memo Lines with Name "Discounts"
    With Type: Line
    Revenue Account: 01.0.000.0000.000.411001.0000
    Active Date: 01-JAN-2007
    When I create transaction with class Invoice
    I select the transaction type, and select customer
    I press on line items button
    I open the list description I select the "discount"
    define as memo line, I save the transactions
    I press on the Complete Button
    After that I navigate to Distributions button
    I found the account affect not read from account
    define for memo lines. It read from revenue account
    define in transaction type
    Especially when I use memo lines, how to read revenue
    account from account assign to memo lines not from
    transaction typeHi,
    In my opinion, we need to set up AUTOACCOUNTING for 'REVENUE' as standard lines so that system picks up Revenue account from Standard memo lines instead of Transaction type.
    Regards,
    Sreenivas

Maybe you are looking for

  • Question about  Load Average in the AWR report

    Hi, I've some database in 11.2 RAC on AIX. I was analyzing the root causes of eviction. Looking AWR Report before the reboot I see: DB1 Host CPU (CPUs:    6 Cores:    3 Sockets: ) ~~~~~~~~         Load Average                Begin       End     %User

  • Oracle 9i for Solaris8 (Intel)

    Hi, Has anyone successfully installed Oracle 9i on Solaris8 (Intel) ?. Pl. post your experience. Thanks

  • Using "Enum constant" in state machine.

    hallo all. i bild state machine, with 10 states. i move beetwen the states with Enum constant. my qustion is: if i want to add/delete some  states, why i need to update the Enum constant at every state ? there is  way to update "Enum constant" at one

  • PO analysis

    Dear all, how can i search the total value to several commodity codes from the purchase order position? Is there any standarf report available? Thanks & BR

  • Retrieve node name from XML

    Hi, I have an XML file that I loaded into Flex converting it into an arrayCollection. If I want to retrieve the node name rather then the node content, how do i do? For istance: <root> <node1>content1</node1> <node2>content2</content2> </root> What I