# Dropbox Upload Using Bash

**URL:** <https://forum.rclone.org/t/dropbox-upload-using-bash/34009>\
**Category:** Help and Support\
**Created:** [November 10, 2022, 8:32pm UTC](https://forum.rclone.org/t/dropbox-upload-using-bash/34009 "2022-11-10T20:32:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 10, 2022, 9:59pm UTC](https://forum.rclone.org/t/dropbox-upload-using-bash/34009/7 "2022-11-10T21:59:07Z")

</div>

> [@Yamiraan](#):
>
> no any error log

well, need to use a debug log, add `--log-level=DEBUG`  
else, no idea why sometimes the command works and sometimes it does not work

> [@Yamiraan](#):
>
> can you share python code for rclone move?

really, just a fancy function for `subprocess.run`  
i use this function, whenever i need to run a command, such as 7z.exe, fastcopy.exe, rclone.exe, vshadow.exe and so on.  
not sure how useful it will be to you.

```auto
    def DoCmd(self, Text, Cmd, Input='', Env=''):
        try:
            if Common.DebugMode:
                Common.Log(self, f'DebugMode: DoCmd: {Text}={Cmd}')
                return
            Common.Log(self, f'DoCmd: Start: {Text}={Cmd}')
            the_env = {}; the_env = dict(os.environ)
            if Env != '': the_env.update(Env)
            x=subprocess.run(Cmd, cwd=Common.ScriptsDir, capture_output=True, text=True, input=Input, env=the_env)
            if len(x.stdout) != 0: xfile = open(f'{Common.BackupLogDir}\\{Text}.stdout.log', "w"); xfile.write(x.stdout); xfile.close()
            if len(x.stderr) != 0: xfile = open(f'{Common.BackupLogDir}\\{Text}.stderr.log', "w"); xfile.write(x.stderr); xfile.close()
            if x.returncode == 0:
                Common.Log(self, f'DoCmd: End: {Text}={Cmd}')
                return x
            else:
                Common.DoEnd(self, f'ERROR: DoCmd: {Text} - {Cmd} with returncode={x.returncode}')
        except Exception as exception:
            Common.DoEnd(self, f'ERROR: DoCmd: {Text} - {Cmd} - {traceback.format_exc()}')

```

---

_[View the full topic](https://forum.rclone.org/t/dropbox-upload-using-bash/34009)._
