Accessing box folders from a box folder from a batch file

回答済み
新規投稿

コメント

5件のコメント

  • 正式なコメント
    Alex Novotny

    Hey Andrew, 

    I'm not sure what your scheduled task is doing, but it might work if you change the default Box Drive location on your machine. I have not tried this though, so I can't confirm it will help. I can say that Box Drive was not meant to be used in this fashion. We typically recommend developers use our APIs to interact with content directly in Box not on local machines. 

    Thanks, 

    Alex, Box Developer Advocate

    コメントアクション Permalink
  • Pitonyak, Andrew (US)

    I had hoped that it would be a simple batch file that would copy files off a box folder and then push a newly generated file into a different box folder. In other words, it should be very simple. I will take a closer look to see if changing the location of the folder changes things, but it looks like the "box program" does not run if I do not do a standard login to the machine. Normally I just SCP and use keys to authenticate but the current project is using box folders and Windows machines. I assume that if I attempt to use the API, then a simple batch file is probably out of the question; but I can take a look since I have never used the BOX API so I have no idea how it authenticates or how you make the calls (Web services, etc). I had hoped that the BOX.exe that was installed would be callable from the command line to mount the folder but it appears to have no affect and it does not appear to take command line parameters.

    0
    コメントアクション Permalink
  • Pitonyak, Andrew (US)

    I have verified that moving the folder (nice tip, by the way) has no effect on the outcome; the folders are not mounted. I decided that the most expedient method was to use the BoxCLI project (https://github.com/box/boxcli). Unfortunately, the box folders that I am using are for an "enterprise" box setup so I need to convince the enterprise box administrator to allow the application credentials that I created to allow the access. Off hand, I think it will work if access can be granted. Network shares would have been an easier solution in this instance (because enterprise level network shares are easily made available). 

    Thanks for the nudge towards the API. If anyone else is looking at this and you are not limited by an Enterprise Box implementation, look at the BoxCLI project and report back. 

    0
    コメントアクション Permalink
  • Alex Novotny

    Hey Andrew, 

    Yes, the enterprise admin will have to approve your access. This shouldn't be too complicated. Would you be interested in doing an adhoc call with me to go into more specifics on how the Box API works? Tips and Tricks... etc?

    Let me know! 

    Alex

    0
    コメントアクション Permalink
  • Pitonyak, Andrew (US)

    Thanks Alex. I will be sure to let you know if I need help with the Box API if the enterprise administrator approves it. Off hand, the API looks pretty straightforward. I was looking at the BoxCLI project because it allowed me to not have to write more complicated code and instead make simple calls from the batch script. This portion should be easy / straight forward and the BoxCLI project looks to provide all the functionality that I will need without having to worry about authentication if properly configured. 

    0
    コメントアクション Permalink

サインインしてコメントを残してください。