Automatically Upload Pictures from Sharepoint local drive to SharePoint User Profile store using C#

I have 10,000 image files(profile pictures) stored at location C:\ProfilePic\ folder. The Local Drive(C:\ProfilePic\)
is in the same machine where SharePoint Server is installed.
Image Files are as below.
DomainName_UserID1.jpg,
DomainName_UserID2.jpg,
DomainName_UserID3.jpg  etc.
I need to upload these images to the SharePoint UserProfile Store for respective users.
Is that possible to write a console application that can query through the pictures saved in the
C:\ProfilePic\ folder, and then upload the Pictures directly from Local Drive to User Profile Store.
The code will do something like below:
Foreach(Images
 saved in C:\ProfilePicFolder)
string DomainName=Images.split(‘_’)[0];
string UserID=Images.split(‘_’)[1];
string AccountName=DomainName+”\”+UserID;
SPServiceContext context=ServiceContext.GetContext(site);
UserprofileManager upm=new UserProfileManager(context);
UserProfile up=upm.GetUserProfile(AccountName);
up[“ImageUrl”].Value=Images from C:\ProfilePic Folder ;
up.Commit();

Yes, you can. Did you check these posts?
http://sharepoint-tamizha.blogspot.com/2013/08/update-user-profile-picture.html
http://www.learningsharepoint.com/2013/01/01/programmatically-createretrieve-user-profileuser-profile-properties-in-sharepoint-2013/
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/41dbf544-0c67-4648-93a2-92c5a09a26b0/programmatically-update-user-profile-properties-in-sharepoint-2013-online?forum=sharepointdevelopment
--Cheers

Similar Messages

  • How do I manipulate & share pictures from an external drive on my Mac and PC using iPhoto?

    I recently got an imac, and I am new to the the mac world but decided I loved my iphone how bad could a mac be?  My husband and I each have our computer he has a PC & I have a mac and a PC laptop.  We bought an external hardrive to dump all my many many pictures on it.  The idea is we will not save anything on our computers but instead work off of the hard drive that is automatically backed up.  Ok now that you know the back ground. 
    How can I view pictures from the external hardrive in iphoto with out haveing to make an iphoto library on my external hardrive.   I would not mind putting all my pictures in the iphoto library as long as I could view or manipulate the pictures from a PC, does anyone know if this is a possibility?  I have asked at the one to one sessions that I paid for but they can't help.  I guess it also hard for them to help when I can't very well be lugging my desk top in and out of the mac store for help.
    Any ideas I really like the iphoto tools and it could be very helpfull, but only if it doesn't limit me to always working from my computer.  I have great photo editing software on my laptop and want to be able to access the pictures from my laptp edit save and later view from my mac.
    Any ideas?  I found out how to make iphoto open the iphoto library on my external harddrive but I am asking for more.
    Please help  thanak you

    System Preferences - Sharing. If you cannot find System Preferences, then use Command - Spacebar and type System Preference and when you see it in Spotlight (uper right) hit return.

  • How to upload pictures from laptop to iphone

    Dear friends,
    i have iphone 4 with IO6, could you please help me with tools how to upload pictures from my laptop to my Iphone?
    Best wishes.

    Use iTunes to sync them to your iPhone... http://support.apple.com/kb/HT4236

  • Delete  flat file from the local drive after downloading in the program

    how to <b>delete flat file from the local drive after downloading in the program</b>
    I am using gui_upload to upload flat file data in internal table. and after that i dont want that flat file in the disk. i want to delete it.

    Once the file has been uploaded into the internal table call the<b> FILE_DELETE </b>method of the class  <b>CL_GUI_FRONTEND_SERVICES</b>.
    DATA: v_rc TYPE i.
    CALL METHOD cl_gui_frontend_services=>file_delete
    EXPORTING
    filename = 'C:\TEMP\MATERIAL.TXT'
    CHANGING
    rc = v_rc
    EXCEPTIONS
    file_delete_failed = 1
    cntl_error = 2
    error_no_gui = 3
    file_not_found = 4
    access_denied = 5
    unknown_error = 6
    OTHERS = 7.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards
    Kathirvel

  • How do i upload pictures from my iPhone 4 to my laptop? the autoplay doesnt show up and i looked up the other answers on here and they havent helped out at all! getting frustrated! HELP PLEASE!

    my iPhone 4 wont upload any pictures to my laptop! the autoplay box doesnt show up when i connect to my laptop but iTunes does show up and sync to my laptop! HELP ME for making me understand how to upload pictures up! and yes i have uploaded pictures from my iPhone to my laptop before and it has work but this past week it hasnt let me do anything except for sync everything except for the pictures

    Check to see if the iPhone is a remove able drive then go thru folders looking for dcim folder that holds the pics on the iPhone

  • How can I Upload Pictures, from my Mac Book Pro Retina Display with Mountain Lion OS? Tried but it gets as far asi  pictures but does not open?

    How can I Upload Pictures, from my Mac Book Pro Retina Display with Mountain Lion OS? Tried but it gets as far as i pictures but does not open?

    This is not necessarily 100% correct at the current time.
    As Dropbox is encouraging people to set it up for automatic uploading of photos they gradually increment your space as you load more pictures for free at the current time.
    You do start with a fixed 2 GB but if you upload photos you will be awarded more free space.
    You can also open a free account with Flickr - you may have some upload limits per day but you can upload pictures there.

  • HT4623 how do I upload pictures from my iphone to the computer?

    How do I upload pictures from my iphone to a pc computer?

    If you have ever synced to iTunes and iCloud, you should have a Photo Stream folder in your Pictures folder. You should see photos upload there automatically every time your phone syncs.

  • Why does it take so long to upload pictures from iphote to AppleTV

    Why does it take so long to upload pictures from iphoto to AppleTV?   It takes hours to see a folder created in iPhoto to finally display on AppleTV.

    Do you mean that you are importing music from an audio CD into iTunes?  If so, the most likely causes of slow speeds are limitations of the CD drive you are using and/or the CD being dirty or damaged. If you turn on error correction within iTunes this can slow down the import process if it is repeatedly re-reading the same data before it gets a repeatable result (though it is a good idea to always have error connection enabled as the alternative is audible errors in the results).  Depending on which system I'm using typical CD reading speeds vary between 5x and 12x (so a nominal 74 min CD imports in 6-15 min).
    Importing a CD has nothing to do with your internet connection (which is only used to look up the song titles, etc. before you start importing).
    However, if you are downloading music from the iTunes store or another internet retailer such as Amazon, I'd expect an album's worth of m4a/mp3 files to download in 1-2 minutes on a typical broadband connection.  If this is what you're doing, and its taking an hour to complete, then there's a problem with the broadband connection itself or with how your PC is set up to use it.

  • HELP!!!!! Please can someone tell me how i upload pictures from my laptop straight to my ipad

    Please can someone tell me how i upload pictures from my laptop straight to my ipad..
    i tried coppying the picture and pasting it on the ipad folder but it doesnt paste. Please can someone help me ASAP.

    Another way. You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    Secrets of the iPad Camera Connection Kit
    http://howto.cnet.com/8301-11310_39-57401068-285/secrets-of-the-ipad-camera-conn ection-kit/
     Cheers, Tom

  • How do I upload pictures from my mac to my iphone

    Hi
    I have thousands of pictures on my imac and just got a iphone.  I also have an ipod touch which automatically updates my pictures whenever I plug it into my computer.  How do I upload pictures from computer to my iphone?
    Thanks

    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    Go to the photo tab and select the folders you want.

  • I uploaded pictures from a second camera and my iphoto created a second library, how do i get back to the first library?

    I uploaded pictures from a second camera and my iphoto created a second library, how do i get back to the first library? Can anyone help?

    I have no idea what you did or what happened - but I can assure you that loading from a different camera does not create a new library
    So you need to supply information and someone here will assist you in sorting this out and figuring out what you really did
    What version of iPhoto do you have? What version of the OS? Why do you think that a second library has been created? What do you see when you launch iPhoto with the optipon kep depressed and use the select library option? Where is your iPhoto library normally?
    Anything else you can tell us that might help?
    LN

  • Since upgrading to Yosemite on my iMac, My Mail app refuses to open, Safari won't load, and I can't upload pictures from my iPad... Please help, any ideas very welcome. I've had my iMac since 2011, and have never had any issues to deal with before..

    Since upgrading to Yosemite on my iMac: My Mail app refuses to open, Safari won't load, and I can't upload pictures from my iPad...
    Please help, any ideas very welcome. I've had my iMac since 2011, and have never had any issues to deal with before..
    Thanks

    29/11/2014 20:17:01.315 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:17:37.013 com.apple.backupd[616]: Finished scan
    29/11/2014 20:17:43.108 com.apple.backupd[616]: Saved event cache at
    /Volumes/Time Machine Backups/Backups.backupdb/Geoff Lambrechts’s iMac
    (2)/2014-11-29-200648.inProgress/9B453663-603F-40B8-AC21-24F05C724E15/.6162AD34- 38F8-30AB-98E0-4A22FB9D311F.eventdb
    29/11/2014 20:17:43.207 com.apple.backupd[616]: Not using file event
    preflight for Macintosh HD
    29/11/2014 20:18:01.561 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:18:16.288 com.apple.xpc.launchd[1]:
    (com.apple.quicklook[715]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.quicklook
    29/11/2014 20:18:23.705 com.apple.SecurityServer[56]: Session 100013 created
    29/11/2014 20:18:32.046 mdworker[718]: code validation failed in the
    process of getting signing information: Error Domain=NSOSStatusErrorDomain
    Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
    29/11/2014 20:19:01.662 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 11 seconds. Pushing respawn out by 49 seconds.
    29/11/2014 20:19:45.458 com.apple.xpc.launchd[1]:
    (com.apple.imfoundation.IMRemoteURLConnectionAgent) The
    _DirtyJetsamMemoryLimit key is not available on this platform.
    29/11/2014 20:19:59.123 com.apple.xpc.launchd[1]:
    (com.apple.PubSub.Agent[725]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.pubsub.ipc
    29/11/2014 20:19:59.123 com.apple.xpc.launchd[1]:
    (com.apple.PubSub.Agent[725]) Endpoint has been activated through legacy
    launch(3) APIs. Please switch to XPC or bootstrap_check_in():
    com.apple.pubsub.notification
    29/11/2014 20:20:01.138 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:21:01.484 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:21:13.430 com.apple.backupd[616]: Found 4529 files (1.1 GB)
    needing backup
    29/11/2014 20:21:18.786 com.apple.backupd[616]: 2.82 GB required (including
    padding), 1.24 TB available
    29/11/2014 20:21:31.775 Console[734]: Failed to connect (_consoleX) outlet
    from (NSApplication) to (ConsoleX): missing setter or instance variable
    29/11/2014 20:21:34.230 WindowServer[162]: disable_update_timeout: UI
    updates were forcibly disabled by application "Console" for over 1.00
    seconds. Server has re-enabled them.
    29/11/2014 20:21:36.898 WindowServer[162]: common_reenable_update: UI
    updates were finally reenabled by application "Console" after 3.67 seconds
    (server forcibly re-enabled them after 1.00 seconds)
    29/11/2014 20:21:36.971 coreservicesd[83]: SFLEntryBase::ListHasChanged
    mach_msg returned 10000004d
    29/11/2014 20:22:01.817 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:23:02.170 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:24:02.547 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:25:02.168 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.233 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.236 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:02.284 CalendarAgent[218]:
    [Refusing to parse response
    to PROPPATCH because of content-type: .]
    29/11/2014 20:25:03.059 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:25:12.674 com.apple.xpc.launchd[1]:
    (com.apple.imfoundation.IMRemoteURLConnectionAgent) The
    _DirtyJetsamMemoryLimit key is not available on this platform.
    29/11/2014 20:26:03.464 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    29/11/2014 20:27:03.841 com.apple.xpc.launchd[1]: (jp.buffalo.NASPower)
    Service only ran for 10 seconds. Pushing respawn out by 50 seconds.
    On 29 November 2014 at 19:29, Apple Support Communities Updates <

  • HT201302 I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks

    I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks!

    If this is an iCloud account the Outbox only appears when sending an email, so if it is still trying I suppose it should be showing now (not sure though, hard to replicate this)
    What type of email account?

  • Why do I receive an error message while attempting upload pictures from iPhoto '09 to Facebook?

    I currently have iPhoto '09 version 8.1.2. I tried uploading pictures from iPhoto to Facebook but I get the message "An error has occured. Please try again later". File > Export > Login (which brings me to the Login page on Facebook) > I sign in & that's when I get the message. I've even tried hitting the Facebook tab on the bottom right. Does anyone have any solutions to my problem? I'll greatly appreciate it. Thanks.

    Did you ever get a response?

  • Using Adobe My Sketch, I can no longer upload pictures from my Library. Why?

    Using Adobe My Sketch, I can no longer upload pictures from my Library. Why?

    Hi Dan,
    Based on the title of your post, seems like the application you were using was "My Sketch". This forum is for Adobe Photoshop Sketch: Adobe Photoshop Sketch on the App Store on iTunes. If you have not tried Adobe Photoshop Sketch, please give it a try. Hopefully, it will be a better fit for what you want to do. You are allowed to select any of your images from your photo gallery.
    Regards,
    Jose

Maybe you are looking for

  • Error while selecting planning app in Business Rules

    Hi , I am not being able to select the planning outline while developing business rules (but I can select the Essbase Outline). Whenever I expand the Planning node, an error pops up the details of which says "Error connecting to Essbase server machin

  • In portal BookMark and save view are not working

    we already published the web application via iView in our portal. What I am looking for is to bookmark an already published web application within EP portal. E.g. I open the web application with specific filter and make some drills. Now I want to boo

  • Changing my apple ID and getting a new free apple email account

    I have an apple ID which was set up using a btinternet account containing my married name.  My marriage has broken down and for a number of reasons I wish to distance myself totally from my former partner, and this includes email addresses. This woul

  • HT1338 can two iphones share the same mac password?

    I updated my iphone and then last night my wife's - but when I try to login it won't except the apple ID that we share?

  • Getting subscription fees from user. Implementing this?

    I'm wondering what options are there and what would be the best option to handle receiving subscription payments from users of a business J2ME app? I would like to have them charged to their phone bill. If the user has been using the app for 6 months