Bw ,file not found

maskros@iMac-som-tillhor-Maskros-2 Documents % bw create attachment --file ./Users/maskros/Documents/secret.txt --itemid a4bae02b-e81e-4c05-9388-b89a011e9a78   Cannot find file at /Users/maskros/Documents/secret.txt

This is something I tried to solve ,but could not .I have the right ID to the folder and also I know that the file is in documents ,still bw says - not found -or cannot find file .

On which bw it says /opt/local/bin/bw it should be in /usr/local/bin/bw ?

This was the first command I ewer learned and it newer let me down ,but I think something with that move I did .

I would suggest checking the output of the following two commands, for diagnostic purposes:

pwd

ls ./Users/maskros/Documents/secret.txt

I did everything ,but could not fix this problem . How to add bw exe to my path ? As it is now - it is in /opt/local/bin/bw
Maybe if I put it in /usr/local/bin/bw it can work .

The ls -I command found that file . I all other areas bw is working - except this one .

What was the output in of the pwd command when you were trying to use the bw create attachment expression from above?

 Documents % bw create attachment --file /Users/maskros/Documents/orebro.txt --itemid dde898e9-8666-450b-85a1-b3570010484b
 
Not found.
maskros@iMac-som-tillhor-Maskros-2 Documents % pwd
/Users/maskros/Documents
maskros@iMac-som-tillhor-Maskros-2 Documents % ls -l /Users/maskros/Documents/orebro.txt
-rw-r--r--@ 1 maskros  staff  172 17 Sep 12:37 /Users/maskros/Documents/orebro.txt



maskros@iMac-som-tillhor-Maskros-2 Documents % pwd
/Users/maskros/Documents

I changed the permissions to the file too nothing helped .Adding bw to my pat ,this I newer did ,so maybe that could help . But bw works in all other areas - except this . It does not Find the file in finder .

I see the file in Documents ,this is a test file , but do not add to my folder .How add bw to my path ?

% pkgutil --pkgs

I see only com.bitwarden.desktop of all listed packages ,should it not be bw exe ?

Assuming that bw.exe is installed in the folder /opt/local/bin, you should be able to use the following command:

export PATH="/opt/local/bin:$PATH"

For best results, you should add this expression to your ~/.zshrc file or ~/.bash_profile, depending on whether your Terminal shell is Zsh or bash (use the command echo $SHELL to determine this, if you’re not sure).

Pasting itemid into the desktop app - it says : no object to show
I will try with that ~ /.zshrc expression too

The desktop app always shows the corresponding folder or item when I type item id or id

The item id is a created one only - but I tested this on real folders too -it is the same . I think I will wait for some days and see if it will be ok with the Desktop app .

What happens if you execute the following expressions in a Terminal shell?

bw -v

bw get item 29427280-ab9d-453a-9014-b353001cd6bc

In the terminal no problem. But I discovered that if the itemid shows the folder or item in the desktop app ,then I can create an attachment ,but not if the item id do not shows anything in the desktop app .
Now my GPG keys are attached to an existing item and not into the folder GPG KEYS ,but I remember where I attached those keys .

So all itemid visible in the desktop app I can create an attachment - but not if the item id shows nothing. Here I do not know what to do . But I see the folder that it is in my vault .

In the CLI I can see all itemid information -there is not a problem .

I created an attachment just a few minutes ago ,but to a different folder .

Also, I created a new folder ,seeing that itemid I pasted it into the desktop app ,showed nothing - so I not tried to create an attachment to that ,it will just put out - not found .

But it works only if the itemid will put out the contents of it in Desktop app.Thesse are old folders created somewhere 2020 or so .

Folder id {"object":"folder","id":"3b730d81-6789-5d8c-bd5f-b35800badeef","name":"orebro"}
t

This is also something strange ,After the output ā€œNot foundā€ then again using that command bw get folder it will show that item id …badeef

the item id real numbers are changed so it is not a problem to put it here.

It is difficult to assist you, because you are not providing the information requested.

My best guess based on the limited information provided, is that you are using Folder IDs instead of Item IDs. Folder IDs cannot be used when searching in the Desktop app; only Item IDs can be used when searching.

Similarly, the command bw create attachment can only be used with Item IDs, not with Folder IDs.

But this explains everything - then I got my trouble sorted out 100 % . I was trying to attach a file to a folder

I have no problem here ,it shows everything clearly .

This then explains everything .My problem is solved .Thanks grb. So bear with me I am working 12 hours a day ,so I am not all knowing ,haha .

Then what is classed as ITEMS in the vault ?

An item is an individual Login item (containing login credentials for one account), or an individual Note item (containing a single text block), or an individual Card item (containing the card number, expiration date, and other information related to one credit card), or an individual Identity item (containing name, address, and other personal information related to one person).

A folder contains items. This is similar to the Mac ā€œFinderā€, in which a folder ( :sweden: ā€œmappā€) can contain files (:sweden: ā€œfilerā€).

I understand .I was missing this important information. A lots of time ,but in this way I also learning. Thanks grb .

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.