+ Post New Thread
Results 1 to 13 of 13
MIS Systems Thread, Report to export student photos and then batch fiel to rename them to UPN number in Technical; I need a report that will export all the student photos and their UPN number, then some how rename all ...
  1. #1
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    974
    Thank Post
    91
    Thanked 14 Times in 13 Posts
    Rep Power
    21

    Report to export student photos and then batch fiel to rename them to UPN number

    I need a report that will export all the student photos and their UPN number, then some how rename all the student photos to their UPN number. I think this is something that will have to be done out of Sims but not even sure it can be done????

  2. #2

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,007
    Thank Post
    679
    Thanked 1,396 Times in 1,156 Posts
    Rep Power
    353
    Check our SalamanderSoft Limited - Free Utilities for an extractor thanks to @rpwillis . It usually names them by the SIMS Admission number.

    It should be fairly trivial to rename to your liking. If you get a report with UPN and Admission number to Excel. I use a program called Bulk Rename Utility Introduction - Bulk Rename Utility , that will let you specify a mapping file, which will be your excel report saved as a text file, and rename in seconds. Failing that i used to use a batch file to do it, but this utility saves the hassle of editing the batch for different answer files.

  3. 2 Thanks to vikpaw:

    Bananas (3rd June 2014), rpwillis (18th December 2013)

  4. #3
    tombry's Avatar
    Join Date
    Jan 2012
    Location
    Bassingbourn
    Posts
    194
    Thank Post
    45
    Thanked 37 Times in 29 Posts
    Rep Power
    22
    in my old job I used to have to rename photo files all the time - I used to use a program called U Rename It to do it when it was a simple thing, but I think if you did this in excel it would be easier - although you would have to know how sims was naming the photos on export.

    but build a concatenate formula of ren "photo name.jpg" "UPN.jpg" and then copy that to a text file and save it as a bat.

  5. Thanks to tombry from:

    Bananas (3rd June 2014)

  6. #4
    Kyle's Avatar
    Join Date
    Jan 2006
    Posts
    974
    Thank Post
    91
    Thanked 14 Times in 13 Posts
    Rep Power
    21
    Check our SalamanderSoft Limited - Free Utilities for an extractor thanks to @rpwillis . It usually names them by the SIMS Admission number
    I've tried this and can't get it to output anything, does anyone know if its compatible to the latest version of Sims?

  7. #5

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,483
    Thank Post
    1,445
    Thanked 1,179 Times in 806 Posts
    Rep Power
    708
    Quote Originally Posted by Kyle View Post
    I've tried this and can't get it to output anything, does anyone know if its compatible to the latest version of Sims?
    I haven't tried it and wasn't going to pipe in here but if you have no luck, I wrote a small tool that may help you

  8. #6

    Join Date
    Jun 2007
    Location
    Wakefield, West Yorkshire
    Posts
    627
    Thank Post
    96
    Thanked 131 Times in 102 Posts
    Rep Power
    67
    I can't help you export them but I've used this before - in excel start with a list of the admin no's and UPNs in adjacent cells then use several cells and the concatenate function - & - to build up a formula that follows this pattern rename "12345.jpg" "UPNNUMBER.jpg"
    Copy the entire column, paste it into notepad to sanitise it then select all copy into a command prompt which is openned in the route of the photo folder - use CD to navigate to that if you need to.

  9. #7
    robk's Avatar
    Join Date
    Nov 2005
    Location
    Ashbourne
    Posts
    757
    Thank Post
    175
    Thanked 130 Times in 109 Posts
    Blog Entries
    1
    Rep Power
    48
    Quote Originally Posted by michael2k6 View Post
    I can't help you export them but I've used this before - in excel start with a list of the admin no's and UPNs in adjacent cells then use several cells and the concatenate function - & - to build up a formula that follows this pattern rename "12345.jpg" "UPNNUMBER.jpg"
    Copy the entire column, paste it into notepad to sanitise it then select all copy into a command prompt which is openned in the route of the photo folder - use CD to navigate to that if you need to.
    What @michael2k6 said... I save as text then rename to .bat after making excel do the work, but paste via notepad sounds like a good shortcut.

    Have you got the photos pre import to sims? If so that might be quicker.

  10. Thanks to robk from:

    michael2k6 (18th December 2013)

  11. #8

    Join Date
    Jun 2007
    Location
    Wakefield, West Yorkshire
    Posts
    627
    Thank Post
    96
    Thanked 131 Times in 102 Posts
    Rep Power
    67
    Another tip if it's going to become a regular thing is create an excel workbook with two sheets, one being a lookup range of all students admin vs UPN.
    Then on the other sheet create a lookup based on column A as your admin number, then you've constantly got an uptodate spreadsheet.
    To get the correct list of images into column A do a dir in a prompt on the images folder, and paste the results into the column. Once you've saved that template you're looking at run DIR, paste into column A and then paste your results column back out into another prompt and you're done.
    The one thing to watch for which will catch you out is that a dos prompt has a limited amount of rows as results before it truncates them top first. So if you're doing DIR on a large amount use powershell. Rename isn't in powershell so you'll have to use powershell for the DIR and cmd for the rename.

  12. #9

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,007
    Thank Post
    679
    Thanked 1,396 Times in 1,156 Posts
    Rep Power
    353
    I'm sure I ran the exporter recently and it was fine. I think I was doing staff though.
    Did you go through the readme file? you need a local connect.ini and a user with permissions.

    All the Dos tips and excel are good, I did it for years, but since moving to a utility I will never go back.

    To make a decent dos list use /w, /b I think for better formatting and also redirect it straight to a text file with a "> list.txt"

    I now just build my mapping file that the utility requires straight in SQL. I just have all the concatenation in that. You could put your rename code in their if you prefer that. So if you're comfortable running SQL on your DB just run that and save as text file and supply to utility or save as bat and run. In theory the SQL can be scheduled to auto run and output to file which is something i do for updating the library system.

    Thing is if you get the extractor to work you don't need a dos list you just need a sims report that gives both columns out to a file, if it a csv then a two line batch script will rename using the for command and you won't need to mess with concatenation. I've posted my rename script on here somewhere before

  13. #10
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,525
    Thank Post
    106
    Thanked 89 Times in 75 Posts
    Blog Entries
    46
    Rep Power
    40
    done this recently for our new allpay install in the dining room. It all worked as described by @vikpaw except bulk rename utility which i took one look at and then decided I didn't have time to figure out that crazy program. Also the site itself was incredibly slow.
    I wrote my own vbs script in 30mins.



    Code:
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
    Dim fso, f, ts,strpath
    
    strpath="d:\test"
    
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile("upns.csv")
    Set FLD = FSO.GetFolder(strPath)
    
      
    Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
       
    Do While ts.AtEndOfStream <> True
    	TextStreamTest = split(ts.ReadLine,",")
    	adno=textstreamtest(0)
    	upn=textstreamtest(1)
    	
    	For Each fil in FLD.Files
    	
    		strOldNamearray = split(fil.Path,"\")
    		fname = strOldNamearray(2)
    		matchname = adno & ".jpg"
    		newname = strpath & "\" & upn & ".jpg"
    		
    		if fname = matchname then fso.movefile fil.path, newname
    	next
    	
    	
    loop
    
    f.close
    set fso = nothing
    set fld = nothing

  14. #11

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    6,007
    Thank Post
    679
    Thanked 1,396 Times in 1,156 Posts
    Rep Power
    353
    I could have shown you how to use the program quicker than that! In place of the csv it just needs a list with <original name>|<new name> on each line.
    It's got so many other really useful features like it can undo what you just did. slightly modify the output, whack on headers, change the file extension etc.
    I frequently use it to copy and rename, so it doesn't alter the originals, but pushes them where i need them. Then i can run the whole thing again with a different mapping file which is required by another system. Undo is the coolest feature though.

  15. #12

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,483
    Thank Post
    1,445
    Thanked 1,179 Times in 806 Posts
    Rep Power
    708
    I wrote a small program a while back that pulls the photos out of SIMS and saves them as either name, UPN, ID or admission number. It can also add the name in a small box below the photo if you want (as part of the final image) and resize on the fly...

    If anyone is interested, I'll knock together some documentation for it (thought it's very simple, just a couple of arguments on the command line - I could put a simple GUI together if people would prefer)

  16. #13

    Join Date
    Jun 2014
    Location
    Lutterworth
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Check out www.bulkrenameutility.co.uk its free and very useful for changing file names.

SHARE:
+ Post New Thread

Similar Threads

  1. [SIMS] CommandReporter script to export all staff and students
    By dunc in forum MIS Systems
    Replies: 3
    Last Post: 24th April 2013, 11:30 AM
  2. Can anyone suggest a tool for staff to reset student passwords and unlock accounts
    By Davit2005 in forum Network and Classroom Management
    Replies: 1
    Last Post: 13th September 2012, 11:49 AM
  3. Replies: 2
    Last Post: 16th February 2011, 09:24 AM
  4. Replies: 4
    Last Post: 6th July 2010, 10:04 AM
  5. Replies: 4
    Last Post: 23rd March 2006, 06:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •