March 11, 201312 yr The folder structure for my SC deployment has a logical need to be human readable. This leads to folders like "AAA_BBB_CCC_D" where the AAA is the Term Code that a course is offered, BBB is the Subject Code (i.e. ENGR), CCC is the Course Number (i.e. 101) and D is the Section Number. Inside that folder are folders for single course documents followed by a UUID (i.e. Syllabus-7A50235B-976C-4BE2-8721-FA7891CECBEA ) and inside those folders are revision histories for each file. Â In trying to idiot proof the solution as much as possible I can foresee a time when someone will upload a file, make multiple revisions to the file, and then notice that the wrong Section Number was used when uploading the files and need to move the data to the correct folder path. SCMove is working for moving single files around but how can I move whole folders with an unknown amount of subfolders around on the SC server. Â I've attached a screenshot of my sample folder structure for a visual reference.
March 11, 201312 yr Hello! SCScanDirectory will produce a return-separated list of all files in a directory with the option to recurse into any found sub-directories. I could see a solution where you ask the user for the incorrect folder and where they want the new folder (and it's name). Then you could iterate over the list of files from SCScanDirectory and parse out the pieces of the folder path you need which then gets fed to a call of SCMove for each file.
March 12, 201312 yr Author Hi Joe! From what I can tell in the documentation SCScanDirectory will only work on local files. I need something that will let me do that same thing on the remote, SC served files.
March 12, 201312 yr Hi Kevin, You're correct that SCScanDirectory will only work on local files. Your best bet is going to be individually targeting the files using SCMove and some information from the user. I'm sorry for the confusion!
Create an account or sign in to comment