Get filename from the command "urlcopy -a"

hello,

In order to download a file with redirect, i use the command

rclone copyurl -P "https://video.com/stream/?vid=vmDZtFsMQ" gdrive:/film -a --transfers 10 --drive-chunk-size 128M

  • I need to get the renamed filename, with the "-a" flag, to insert in databse mysql. Or rename the file, but without the "-a", rclone don't want to download.

thanks

Haven't used this myself, but took a quick look in the code: It seems easy enough to adjust it to output the actual name when using -a/--auto-filename option. You would then probably want it on stdout - and just the name as a plain string (not date, size or anything like in ls output other than plain lsf)? Should probably be optional, so only if a new option (e.g. --print-filename) is specified. Unless someone else has a trick to achieve this, you could perhaps register an issue for it?

without the "-a", rclone don't want to download.

Could you add some more details? Error messages? Any hints from verbose output (-vv)?

yes i want to retrieve the filename in a variable in order to use it.

i have changed my command and the program. if i rename directly the file without the -a option it's ok.

rclone copyurl -P "https://video.com/stream/?vid=vmDZtFsMQ" gdrive:/film/newname.mp4 --transfers 10 --drive-chunk-size 128M

hi,

copyurl copies a single file, so --transfers is not needed.

1 Like

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