Copy link to clipboard
Copied
Hello everyone, everything good?
Let's say that on my desktop I have a Matrix folder called "Data" and there are some subfolders in it.
How do I go through all the subfolders, check all that are named with digits and dot(.) type: "01.01.2022", "01.02.2022" ...... and move them to a subfolder called "Backup" .
Here goes the extrusion of the main "Data".
link: https://drive.google.com/file/d/1wsc1dSQ46Eun0hau96x_EvXAQNEYtftd/view?usp=sharing
I confess that a script like this is very difficult I managed to do. I have nothing in mind at the moment.. Any help is greatly appreciated.
File(dat = '~/desktop/Data').getFiles(function(v){!(nme = v.name)
.split(/^[\d\.]+$/)[0] && v.rename(File(dat + '/Backup/' + nme))})
Copy link to clipboard
Copied
File(dat = '~/desktop/Data').getFiles(function(v){!(nme = v.name)
.split(/^[\d\.]+$/)[0] && v.rename(File(dat + '/Backup/' + nme))})
Copy link to clipboard
Copied
Great! @Kukurykus, man you are the greatest. Worked perfectly. Thanks