Get history information of files with rClone

HI, i'm new to the foruns, using rClone for some months now, it's a great tools, thx a lot for taking the efforts to develop and maintain such a great software. I'm not sure if this type of question can be asked here, if that's not the case i'm sorry, just remove it.

I'm trying to develop a simple batch to scan a google drive (that i've filled with rclone from some sources) and return all the folders that had files uploaded or changed on the last 24hs.
Currently i'm using the command (doing it on windows via prompt):

rclone lsf up:MyDrive -csv -R --files-only --max-age 24h

That would give me the list i need but i would like to have on this list the date/time of each file upload/modification (only last is enough) and also if possible the total size of file.

Also, is there a way to get this list but only of files that does not have changes in the last 24hs (they will have a folder and files inside but the change would be on more than 24hs)?

Not sure if its possible on same line, but if i can get the file and on next line the date/size or 1 line for file, other for date and other for size, anything like that would do, i believe i'm not mixing the right parameters, or looking at this the wrong way.

I believe that can be done easily with powershell but i was looking to do it with batch file only and rclone if possible, any toughts are appreciated.

Thx a lot for any tips.

I´ve found some other command with are very interesting, trying to format the output, but i'm not getting it to work with the --ordery-by flag, would that not work with "lsl" command? I´m trying to order by the file name, but is seems to not work
(trying: rclone lsl up:MyDrive --max-age 24h --order-by name)

That is a great start. What you need to do is investigate the --format parameter of rclone lsf

Something like this

rclone lsf up:MyDrive -csv -R --files-only --format pst --max-age 24h

Does --min-age 24h work for you?

You can use rclone lsf to get data one line per file. It won't give you data spread over multiple lines - you'll have to post-process for that. You might also find rclone lsjson useful if you are set up to ingest JSON info.

--order-by controls the order of syncing not of listing, alas. Rclone doesn't have a way of controlling the order of a listing at the moment.

thank u a lot for all the feedback, with that and a little more search on the forum, manual and site i was able to achieve what i needed!!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.