How to adjuwst this Automator?

I have a folder with several films files.
I only need in the files contained in a VIDEO_TS folder
Using I can get every folder containing a “VIDEO_TS” folder.
I can then select it and using control up-arrow I can move to the enclosing folder
my Automator action will then Move the selected folder to another location.
However in AUTOMATOR I cannot find any ways to find the enclosing folder containing a “VIDEO_TS”.

Is there a more efficient Applescript which will
1- scan all folders containing “VIDEO_TS” folders in the selected hard disk,
2- go to the first folder
3- move to its enclosing folder
3- move this folder to a destination folder
4- go to the next folder including the “VIDEO_TS” and repeat the action till all VIDEO_TS folders are moved to the destination?

Thanks for any help

Model: MacBook PRO
Browser: Safari 537.36
Operating System: macOS 10.14

This can be done, but it is better not to do it. If you run the script another time, the VIDEO-TS folders transferred earlier 1 level higher, will be transferred one more level higher and you will have complete chaos with your DVDs.

How to do it:

  1. Open Automator
  2. In the window that pops up, highlight Workflow and then hit Choose.
  3. Now in the Library section on the left, click on Files & Folders and then find Find Finder Items. Drag it to the main window on the right.
  4. In the field Search choose Computer
  5. In the field of the following is true choose All
  6. Set with “+” button Name is VIDEO_TS

That gives as RESULT all VIDEO_TS folders of your disk (as list).
Let’s continue:

  1. In the Library section on the left, click on Utilites and then find Run Apllescript. Drag it to the main window on the right (under the first action).

NOTE: back up your DVDs to external disk before running the workflow!!!

Popups AppleScript code template. Replace it with the following script:

on run {input, parameters}
	repeat with theItem in input
		tell application "System Events"
			set sourceFolder to container of theItem
			move theItem to container of sourceFolder
			-- move sourceFolder to trash -- uncomment if you need this
		end tell
	end repeat
end run

Back up your DVDs to external disk!!! Now run workflow only once!!!

Thanks you for your interest and time:
Unfortunately I received the following error while using the Workflow you suggest

The action “Run AppleScript” encountered an error: “System Events got an error: Can’t make alias “Moderno:Users:dante:Desktop:Test:Club-Zeus:VIDEO_TS:” into type specifier.””

System Events got an error: Can’t make alias “Moderno:Users:dante:Desktop:Test:Club-Zeus:VIDEO_TS:” into type specifier.

As I don’t have space to copy all the file I created and copied various files in another drive including both some folders with the “VIDEO_TS” folder inside, some other folders without it, and even some plain film files with the regular extension. I did it as the drive I need to work with contains all of those.

Automator select properly every folder with “VIDEO_TS” and skips all others just fine.

I tried to move the files which gave the error to the desktop but something new happens: The finder requests me to give my password and attempts to copy the files rather than just moving them- If I trash them this doesn’t happen,but if I want to move them back to the Test folder again the finder asks for my administrator password to do so.
I wonder if this a feature for HighSierra or something else

I am unable to post a screenshot of the workflow which could be useful to track errors if any. However I choose the folder with the copies of the folders and selected it in the first section of Applescript, the rest is just a copy of your work.

I also have 2 questions

Since these films are mainly my students work and they are nowjere to be found except this hard drive, they are extremely valuable to my 12 years hard work in college.
In the script
move theItem to container of sourceFolder
– move sourceFolder to trash – uncomment if you need this
I didn’t uncomment this, but can I just erase it to make sure it wont delete anything?

Also is there a action to add at the end of the Automator Job telling to close down the app, so nothing can get confused or lost?

I updated the script, but now the error occurs with VIDEO_TS folders on iCloud. I recommend do not use that script to avoid destruction of your data. I found one other problem too. If one DVD contains
Disk1 and Disk2 and each of them contains VIDEO_TS, then moving these VIDEO_TS to grandparent folder will corrupt the first VIDEO_TS.

I recommend you only find all DVDs of your machine, and move its VIDEO_TS folders if need manually to avoid corruption of your DVDs.

Trow workflow. No need and contains danger script. Create in Finder new Smart folder. Name it All my VIDEO_TS. For the search criteria put Name is VIDEO_TS. This way you have all VIDEO_TS at one virtual place. You can save this Smart folder (button “Save” on window) on your desktop and edit what you need with safiety. To move VIDEO_TS, select certain VIDEO_TS in Smart folder’s window and go by Show in Finder