Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here! 

Forum Discussion

TonK's avatar
TonK
Helpful | Level 6
7 years ago
Solved

Start Dropbox in batch file - Windows10

When I plan sync with dropbox I start a .bat file.

In case dropbox is active, the script is running normally

In case dropbox is not actieve dropbox.exe is started but the script doesn't continue unless I select the window ( eg by mouseclick).

Start /c doesn't solve.

@echo off
set path="C:\Program Files\WinRAR\";"c:\Program Files (x86)\Dropbox\Client\";"c:\Program Files\Microsoft Office\root\Office16\";%path%
start dropbox.exe
rem C:\Windows\System32\cmd.exe /c "PowerShell.exe -NoProfile -Command Clear-RecycleBin"
echo:
echo:	!!!  Zijn alle bestanden en toepassingen gesloten ? 
echo:
choice /C MZC /M "...>>>...Maak een keuze M voor incl pst, Z zonder pst, C om te stoppen."
echo:
if errorlevel 3 goto 3
if errorlevel 2 goto 2
if errorlevel 1 goto 1

:1
ECHO: 		Alleen de gewijzigde data INCL. PST worden verwerkt - kan ook dat er geen zijn !
Echo:
rem TASKKILL /IM OUTLOOK.EXE
Echo: Met PST
rem winRAR a -ao -ac -ed -oni -  etc 
rem winRAR a -ao -ac -ed -oni - etc
pause
exit

:2
ECHO: 		Alleen de gewijzigde data ZONDER PST worden verwerkt - kan ook dat er geen zijn !
Echo:
rem winRAR a -ao -ac -ed -oni - etc
echo:  Zonder PST
pause
exit

:3
exit
  • Hi Rich,

    Thank you for your efforts to help.

    I tested next script in a separate batch file and it runs as normal. But adding this .bat in my original script (call ..) is is not

    @echo off
    set app="c:\Program Files (x86)\Dropbox\Client\Dropbox.exe"
    taskkill -F -IM "Dropbox.exe"
    start "Restart Dropbox" %app% -B;
    exit

    I suggest we stop this matter an I will deal with a minor problem = selecting the shown window by mouseclick :disappointed_relieved:

6 Replies

Replies have been turned off for this discussion
  • Rich's avatar
    Rich
    Icon for Super User II rankSuper User II
    7 years ago

    Have you tried it without using the start command, just calling dropbox.exe directly?

    If the above doesn't help, then you'll have better luck asking this on a scripting or Windows forum. This really isn't a Dropbox issue.

  • TonK's avatar
    TonK
    Helpful | Level 6
    7 years ago

    Rich, thank you for reacting.

    Yes, I tried your proposal, aswell Call. But withou results.

    I think it is a Dropbox matter because using other applications the script is running fine. After loading dropbox there is no return tot the windows started from.

  • Rich's avatar
    Rich
    Icon for Super User II rankSuper User II
    7 years ago

    But you're using Dropbox in a manner that's not intended. You're trying to control when Dropbox is running when Dropbox is meant to be running all the time.

    When used as intended, it works properly. That is why this wouldn't be a Dropbox issue. It's an unsupported configuration.

  • TonK's avatar
    TonK
    Helpful | Level 6
    7 years ago

    The background is that i don't want to run dropbox all the time but only when I have file to sync. It is not loaded after booting the PC.

    Is there another way to control access to dropbox i.s.o. shutting down dropbox?

    May be stopping/starting the drop service ?

  • Rich's avatar
    Rich
    Icon for Super User II rankSuper User II
    7 years ago

    Some have used scheduled tasks along with taskkill to start and stop the dropbox.exe process.

  • TonK's avatar
    TonK
    Helpful | Level 6
    7 years ago

    Hi Rich,

    Thank you for your efforts to help.

    I tested next script in a separate batch file and it runs as normal. But adding this .bat in my original script (call ..) is is not

    @echo off
    set app="c:\Program Files (x86)\Dropbox\Client\Dropbox.exe"
    taskkill -F -IM "Dropbox.exe"
    start "Restart Dropbox" %app% -B;
    exit

    I suggest we stop this matter an I will deal with a minor problem = selecting the shown window by mouseclick :disappointed_relieved:

About Integrations

Find solutions to issues with third-party integrations from the Dropbox Community. Share advice and help members with their integration questions.

Need More Support

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!