merlyn383 Posted March 11, 2013 Posted March 11, 2013 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.
Joe Pampalon Posted March 11, 2013 Posted March 11, 2013 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.
merlyn383 Posted March 12, 2013 Author Posted March 12, 2013 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.
Joe Pampalon Posted March 12, 2013 Posted March 12, 2013 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!
Recommended Posts
This topic is 4275 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now