• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Can Bridge open to a Default Folder?

Explorer ,
Jan 17, 2018 Jan 17, 2018

Copy link to clipboard

Copied

I store my RAW images in an IMPORT folder that contains subfolders.

Is it possible to set Bridge to display this IMPORT folder when started?

I have a 4TB drive with lots of folders that I have to scroll through to find my IMPORT folder and would rather just have Bridge look to this folder when I start the program

TOPICS
Scripting

Views

1.7K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

Might be possible via scripting… However you don’t really need to go that far. You can set a favourite using the Window > Favourites panel menu and Bridge will also remember the last viewed location (caveat being that if an external drive directory marked favourite is not mounted/available, it will be removed from the list when clicked on). Another option would be to build a Smart Collection for the import folder.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 18, 2019 Jun 18, 2019

Copy link to clipboard

Copied

Here's a script I have just put together, it add a new preference "Startup Folder" where you can select the default folder and switch it on/off

Haven't done much testing but it seems to work.

if(BridgeTalk.appName == "bridge") {

if(app.preferences.pref == '' || app.preferences.pref == null)   pref();

}

function pref(){

var Prefs= File(Folder.userData +"/DefaultFolder.dat");

DF ={};

if(Prefs.exists){

Prefs.open('r');

DF = eval(Prefs.read());

if(DF.dfolder != "" && DF.CB == "true") app.document.thumbnail = Folder(DF.dfolder);

Prefs.close();

}else{DF.dfolder="";DF.CB = false;}

    var prefHandler = function(event){

        if(event.type == "create" && event.location == "prefs") {

            var panel = event.object.addPanel("StartUp Folder");

            var ckbox = panel.add("checkbox",[5,20,25,40],"Use Default Folder");

            ckbox.value = DF.CB;

            var dFolder = panel.add("statictext",[5,50,300,70],"");

            if(DF.dfolder != ""){

                dFolder.text = DF.dfolder;

                }

            var selFolder = panel.add("button",[5,80,100,120],"Select Folder");

            selFolder.onClick=function(){

                defaultFolder = Folder.selectDialog("Please select the source folder");   

                if(defaultFolder !=null){

                dFolder.text =  decodeURI(defaultFolder.fsName);

                DF.dfolder = decodeURI(defaultFolder.fsName);

                if(ckbox.value) app.document.thumbnail = Folder(DF.dfolder);

                DF.CB = ckbox.value;

                Prefs.open('w');

                Prefs.write(DF.toSource());

                Prefs.close();

                    }

                }

            ckbox.onClick=function(){

                if(ckbox.value && dFolder.text == ""){

                    alert("Please select Default Folder first!");

                    ckbox.value = !ckbox.value;

                    }

                    if(ckbox.value && dFolder.text != ""){

                        app.document.thumbnail = Folder(dFolder.text);

                        DF.CB = ckbox.value;

                        Prefs.open('w');

                        Prefs.write(DF.toSource());

                        Prefs.close();

                        }

                    if(!ckbox.value){

                        DF.CB = ckbox.value;

                        Prefs.open('w');

                        Prefs.write(DF.toSource());

                        Prefs.close();

                        }

                    }

      }       

        return { handled: false };

    }

    app.eventHandlers.push({handler: prefHandler});

}

count=0;

function onDocLoadEvent( event ){

if(event.object instanceof Document &&  event.type == "loaded" ){

if(count >0) return;

var pre = app.preferences;

if(!pre.ShowTooltips || pre.ShowTooltips) {

 

var Prefs= File(Folder.userData +"/DefaultFolder.dat");

DF ={};

if(Prefs.exists){

Prefs.open('r');

DF = eval(Prefs.read());

Prefs.close();

if(DF.dfolder != "" && DF.CB == true) {

    app.document.thumbnail = Folder(DF.dfolder);

    count++;

    }

}return { handled: false};}}}

app.eventHandlers.push( { handler: onDocLoadEvent} );

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 20, 2019 Jun 20, 2019

Copy link to clipboard

Copied

After a bit more testing there was a bug found (If the default folder was deleted) this has been rectified.

To install copy the code into a PLAIN TEXT editor and save it out with a .jsx extension to the correct folder.

The correct folder can be found by going to the Preferences - Startup Scripts and click "Reveal My Startup Scripts"

This will open the folder where the script is to be saved.

Close and restart Bridge then accept the new script.

To use: Preferences - StartUp Folder then click the button to select your default folder, tick the checkbox and that's it.

if(BridgeTalk.appName == "bridge") {

if(app.preferences.pref == '' || app.preferences.pref == null)   pref();

}

function pref(){

var Prefs= File(Folder.userData +"/DefaultFolder.dat");

DF ={};

if(Prefs.exists){

Prefs.open('r');

DF = eval(Prefs.read());

if(DF.dfolder != "" && DF.CB == "true") app.document.thumbnail = Folder(DF.dfolder);

Prefs.close();

}else{DF.dfolder="";DF.CB = false;}

    var prefHandler = function(event){

        if(event.type == "create" && event.location == "prefs") {

            var panel = event.object.addPanel("StartUp Folder");

            var ckbox = panel.add("checkbox",[5,20,25,40],"Use Default Folder");

            ckbox.value = DF.CB;

            var dFolder = panel.add("statictext",[5,50,300,70],"");

            if(DF.dfolder != ""){

                dFolder.text = DF.dfolder;

                }

            var selFolder = panel.add("button",[5,80,100,120],"Select Folder");

            selFolder.onClick=function(){

                defaultFolder = Folder.selectDialog("Please select the source folder");   

                if(defaultFolder !=null){

                dFolder.text =  decodeURI(defaultFolder.fsName);

                DF.dfolder = decodeURI(defaultFolder.fsName);

                if(ckbox.value) app.document.thumbnail = Folder(DF.dfolder);

                DF.CB = ckbox.value;

                Prefs.open('w');

                Prefs.write(DF.toSource());

                Prefs.close();

                    }

                }

            ckbox.onClick=function(){

                if(ckbox.value && dFolder.text == ""){

                    alert("Please select Default Folder first!");

                    ckbox.value = !ckbox.value;

                    }

                    if(ckbox.value && dFolder.text != ""){

                        app.document.thumbnail = Folder(dFolder.text);

                        DF.CB = ckbox.value;

                        Prefs.open('w');

                        Prefs.write(DF.toSource());

                        Prefs.close();

                        }

                    if(!ckbox.value){

                        DF.CB = ckbox.value;

                        Prefs.open('w');

                        Prefs.write(DF.toSource());

                        Prefs.close();

                        }

                    }

      }       

        return { handled: false };

    }

    app.eventHandlers.push({handler: prefHandler});

}

count=0;

function onDocLoadEvent( event ){

if(event.object instanceof Document &&  event.type == "loaded" ){

if(count >0) return;

var pre = app.preferences;

if(!pre.ShowTooltips || pre.ShowTooltips) {

 

var Prefs= File(Folder.userData +"/DefaultFolder.dat");

DF ={};

if(Prefs.exists){

Prefs.open('r');

DF = eval(Prefs.read());

Prefs.close();

if(DF.dfolder != "" && DF.CB == true) {

    if( Folder(DF.dfolder).exists ){

    app.document.thumbnail = Folder(DF.dfolder);

    }else{

        Prefs.open("w");

        DF ={};

        DF.dfolder="";

        DF.CB = false;

        Prefs.write(DF.toSource());

        }

    count++;

    }

}return { handled: false};}}}

app.eventHandlers.push( { handler: onDocLoadEvent} );

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

Didn´t work.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 18, 2018 Jan 18, 2018

Copy link to clipboard

Copied

Add that folder to Bridge's favorites. Then it's just one click away.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 18, 2019 Jun 18, 2019

Copy link to clipboard

Copied

I would also like the option to have Bridge open in one specific folder every time rather than "last".  People have been asking for this on forums for more than 10 years.  Seems like an easy option to add to preferences.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Moved to Bridge Scripting

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

I wrote a script to do just this and will include it in my next release of Utility Script Pack for Bridge.

This is a basic version, that will automatically open the Desktop folder on launch. It can be easily modifed to choose and save a folder of your choice or you could hardcode a different folder.

#target bridge
if(BridgeTalk.appName == 'bridge'){
try{
function appQuit(event){
if(event.location == 'app' && event.type == 'close'){
var thumb = new Thumbnail(Folder('~/Desktop'));
app.document.thumbnail = thumb;
}
return{handled:false};
}
app.eventHandlers.push({handler: appQuit});
}
catch(e){
alert(e + ' ' + e.line);
}
}

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2020 Aug 06, 2020

Copy link to clipboard

Copied

LATEST

For a configurable version, download the beta of my script pack.

 

https://www.dropbox.com/sh/9pmgh8x5hftlgi5/AABnO8MpX4xoSWy2QUFY4eVIa?dl=0

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines