Transfer file to folders named after current year and month

Advertisement

Redoxi
Joined:
Posts:
1
Location:
Germany

Transfer file to folders named after current year and month

Hey,

I got it working to transfer files using a batch file over FTP. Now I wanted to ask if there is a possibility to create / move the files depending on creation date to specific folders?

For example I have files from 2024, 2023, 2022, 2021 etc.

And I have a folder structure like:
-Data
   -2024
      -January
      -February
      -March
      -...
   -2023
      -January
      -February
      -...
   -2022
      -...
   -2021
   -...

etc.

My filenames are formatted like this: YEARMONTHDAY.TXT

And I also found something in the docs:
put -filemask=*.html -resumesupport=on *
So I could just do: put -filemask=2024*.txt I guess? But that means, that the folder would also need to be done manually every year. Is there something to fully automate this (Like creating folders for year and month)?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum