How to create a batch/ .bat file?

What is the problem you are having with rclone?

Not really a problem with rclone, I apologize if this has been asked before, but could anyone please help me out in teaching how to create batch file since I really find it tedious to create the mounting process every time I turn on my pc.

What is your rclone version (output from rclone version)

rclone v1.53.1

  • os/arch: windows/amd64
  • go version: go1.15

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 7 Ultimate, 64 bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

C:\Users\*****\Desktop>rclone mount --vfs-cache-mode full bhlinn:/ J:

The rclone config contents with secrets removed.

[bhlinn]
type = drive
scope = drive
token = {******************************************************************************************}

hello and welcome to the forum.

create a plain text file, let's call it mount.cmd
put the rclone command in that text file.
rclone mount --vfs-cache-mode full bhlinn:/ J:

to run the file.

  • double-click it from windows explorer.
    or
  • open a command prompt and type mount.cmd and press enter.

if you want to run the mount at system start up then you can use task scheduler.

2 Likes

Thanks you so much for the help @asdffdsa sorry to bother you but do you know how to limit rclone from downloading the entire folder, as I want to stream a particular video file from google drive but rclone downloads the entire folder on my pc. Is there anyway to limit this? and thanks again for helping me out

glad to help.

  • are you using the same mount command as above?
  • how are you streaming the video?
    ** double clicking in windows explorer
    ** vlc or media player
    ** plex
    ** or what?

how to do you know that rclone is downloading the entire folder?
into which local folder is rclone downloading the entire folder to?

to really understand what is going on, need to add debug log the the mount command.

To answer your questions
1.yes I am using the same command as above
2.I am using mpv to stream my videos on google drive
3.I have set a cache directory "--cache-dir E:\rclone" to where the video/data's are being downloaded, so that's how I know where it's being downloaded.
Sorry for asking this how do you create a debug log file.

https://rclone.org/docs/#log-file-file
https://rclone.org/docs/#log-level-level

so append something like this to your command.
"--log-level=DEBUG --log-file=c:\path\to\log\folder\log.txt

rclone will use the cache to download chunks of a file, as mpv requests that chunk of the file in the cloud.

what makes you think rclone is downloadin the entire folder?

as a test

  • kill the rclone mount
  • delete the contents of the cache-dir
  • start to play one media file.
  • when you see that rclone has downloaded all the files, post the contents of the cache-dir

Capture
This how I know that the rclone is downloading more than usual. I am trying to stream a 490Mb file but rclone downloads more than 920Mb @asdffdsa and I will try to create a log file now

  • each time you change the mount command you need to post it. so can you post the latest command.
  • you need to post the file contents of the cache folder.
  • the latest version of rclone uses sparse files
    ** notice that size if 4GB but the size on disk is just 923MB.

Here is the log file https://anonfiles.com/Z8kaUdW0o2/log_txt and to answer your question yes I am trying to stream a single file

yes I know the size on disk is 923MB but I only wanted to download/stream the single file which around 490~500Mb but rclone is downloading additional contents of the folder which aren't required. And here are the is the command of the recent one
rclone mount --vfs-cache-mode full bhlinn:/ J: --vfs-cache-max-age 30m --cache-dir E:\rclone
how can I post the content's of the cache folder?

dir e:\rclone /s

Um, where should I enter this?

on the command line.

I am getting an error when I paste this command "rclone mount --vfs-cache-mode full bhlinn:/ J: --vfs-cache-max-age 30m --cache-dir e:\rclone /s"
Command mount needs 2 arguments maximum: you provided 3 non flag arguments: ["bh
linn:/" "J:" "/s"]

you added a /s to the command, remove it

note: you can use backticks instead of quotes to enclose the command
image

you had previously asked me to add this to my command dir e:\rclone /s I did the same that's why I got the error, excuse me for this question but what should I have added instead of /s?

we need to see the files in the rclone cache.

run this command from the command line
dir /s
better yet, run this and the output will be saved file files.txt
dir e:\rclone /s > files.txt

files.txt (6.5 KB)
thank you I have done it and as you can see I wanted to download the clean opening from dmon extra's folder but rclone downloaded the last 2 ep's without my consent

i would kill the mount, remount, start to play a video, then re-run the dir command.
post the result.

I think maybe I wasn't clear but I was trying to tell that rclone downloads other videos in the folder without any consent, is this possible to fix this?