• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Move only numerically renamed folders.

Engaged ,
Feb 01, 2022 Feb 01, 2022

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.

 
TOPICS
Actions and scripting

Views

220

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 01, 2022 Feb 01, 2022
File(dat = '~/desktop/Data').getFiles(function(v){!(nme = v.name)
.split(/^[\d\.]+$/)[0] && v.rename(File(dat + '/Backup/' + nme))})

Votes

Translate

Translate
Adobe
LEGEND ,
Feb 01, 2022 Feb 01, 2022

Copy link to clipboard

Copied

File(dat = '~/desktop/Data').getFiles(function(v){!(nme = v.name)
.split(/^[\d\.]+$/)[0] && v.rename(File(dat + '/Backup/' + nme))})

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 01, 2022 Feb 01, 2022

Copy link to clipboard

Copied

LATEST

Great! @Kukurykus, man you are the greatest. Worked perfectly. Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines