Skip to main content
Question

Box folder missing after logging out , comes back after login

  • May 22, 2025
  • 6 replies
  • 26 views

Forum|alt.badge.img

This is not a question about a folder that has gone missing, never to return. The folder is not present unless I am logged in.

I wrote a script to download items from and sftp site and upload to Box.  The script is on the server ( aws ec2 ) and is run from an SQL job. I want the script to run, even if I am not logged into the machine.  After much troubleshooting, it appears the Box folder does not exist (according to PowerShell ) when run as a task job after I log out. The script runs fine if I am logged in.

Is this the desired behavior ? AM I going to have to use the API to upload file ? 

6 replies

Forum|alt.badge.img

Hi, 

I'm a little confused on your question... how are you uploading the folder to box today? ftp? 


Forum|alt.badge.img

Currently it is a manual process( download using winscp GUI to box folder ) . I wrote a batch script that calls winscp to automatically download.  The batch script  runs fine when run from the command line, and also from an SQL job ( if run by hand ). When I schedule to run the job automatically at 10 PM ,  the winscp download errors out with "<box folder>" does not exists. I then wrote a simple batch file that calls dir and the <box folder> and it also return "does not exist". It is not a permissions issue ( that would yield "access denied" ). The < box folder>, which is reality is just a sym link, doesn't seem to exist when I am not logged in. 


Forum|alt.badge.img

What do you mean by "logged in"... you mean to Box in a web browser or into your computer? 


Forum|alt.badge.img

Logged in to the computer ( the server ).  I am trying to script here , not use a browser. We have box drive ( sync ? ) installed . 


Forum|alt.badge.img

Ah! I see. You are using Box Drive. Got it. I believe you have to be logged into order for Box Drive's authentication to work - ie in order to find the folder you are looking for... Have you tried using the script to call the API directly vs the local drive? 


Forum|alt.badge.img

No, I have not tried the API. Will look into it.