Is there any way to Move/Rename a large number of files all at once?

Troy Wolters's Avatar

Troy Wolters

03 Jul, 2015 12:39 PM

Hello,

I wrote a script on our server to give me a list of all the orphaned assets in a given folder. An asset is orphaned if it is not referred to by any other file in the folder or sub-folders. I need to move all of these orphaned assets into a new folder named "Orphaned", but there doesn't seem to be any way to do this other than manually. I was told there is no command line access to Cascade, so I'm just wondering if there is any way around doing thousands of manual Move/Rename operations. Do you know of anything that could help my situation?

Thank you for your time,
Troy Wolters

  1. 1 Posted by Ryan Griffith on 06 Jul, 2015 12:25 PM

    Ryan Griffith's Avatar

    Hi Troy,

    This can be accomplished using Web Services by editing the parent folder of the given asset. Additionally, you can create a batch operation which contains multiple move operations within it.

    The biggest catch is you will need to match the published file to the asset within Cascade. If they are all within the same Site, you can use the Site, path and asset type to perform the operation on a given asset, as opposed to the asset ID. Note: for pages you would need to remove the file extension.

    I went ahead and made this discussion public and moved it into the Web Services category to see if any of our clients have implemented something similar and would be willing to share.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Troy Wolters on 06 Jul, 2015 01:04 PM

    Troy Wolters's Avatar

    Thank you for the information, Ryan. I ended up finding the folder method later on the day I posted. It has been satisfactory to accomplish what I need to do in a reasonable amount of time.

    The only problem I came across was that there is no option to unpublish content when doing a bulk move via the parent folder method. There's a fairly simple workaround by unpublishing the parent folder of the orphaned content, doing to the bulk move, and then republishing the folder. It might be nice to include the unpublish checkbox for bulk Rename/Move operations in future versions of Cascade, but I don' t know if this is the place to suggest that or not.

    Anyway, this solution is working for me, so thank you. Please use this question however you like to help whoever may need it.

    Thank you again,
    Troy

  3. 3 Posted by Ryan Griffith on 06 Jul, 2015 05:59 PM

    Ryan Griffith's Avatar

    Thank you for following up, Troy, I am glad to hear you were able to come up with a working solution. I will definitely make a note of this as a possible solution if other ask in the future.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 06 Jul, 2015 05:59 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM