How to change the location of Viber downloads folder
Solution 1
This is a complimentary answer to AliNa's.
If you want to move your previously downloaded files to the new location follow below steps:
- Backup your downloaded files
- Backup
.ViberPC
folder - Open
~/.ViberPC/{your-phone-number}/viber.db
with sqliteman Paste below query to query edit area:
Update messages set PayloadPath = replace(PayloadPath, "Documents/ViberDownloads", ".viberdownloads") where PayloadPath is not null and PayloadPath <> '';
What this does is; replaces text Documents/ViberDownloads
with .viberdownloads
in PayloadPath
field of messages
table. I typed ".viberdownloads" because I wanted my downloads in /home/user/.viberdownloads folder. Change these strings according to your use.
- Click Run(F9)
Make sure you carefully backup .ViberPC
folder, if something goes wrong you will lose all your message history on this machine.
Solution 2
In OSX you can find ViberPC
folder here /Users/<Username>/Library/Application Support/ViberPC
Solution 3
The above didn't work for me (in version 6.5.5), so I temporarily fixed it by hacking the main viber binary, the sed below replaces ViberDownloads with .viberDownload:
sudo -i
cd /opt/viber
cp -a Viber Viber.original
hexdump -ve '1/1 "%.2X"' Viber.original | sed "s/5669626572446F776E6C6F616473/2E7669626572446F776E6C6F6164/g" | xxd -r -p > Viber
Related videos on Youtube
AliN
Ubuntu user since late 2011, also interested in Firefox », SailfishOS », writer of Linux Season », an Iranian website of GNU/Linux news. Language passionate, EO-isto, technical translator EV geek », mechanical engineer.
Updated on September 18, 2022Comments
-
AliN almost 2 years
Files transferred by Viber are stored on
~/Documents/ViberDownloads
by default. How is it possible to change the destination to a location under~/Downloads
? -
muru over 6 yearsYou could probably do
sudo sed -i.original 's/ViberDownloads/.viberDownload/g' /opt/viber/Viber
; the string exists as-is in the executable. -
nightshift over 6 yearsYes, the straight
sed
works too. Note to anyone attempting this: the replacement string must not be longer than the original. But it can be shorter, just pad with NULLs. -
Sasha over 4 yearsI made it to use
~/Downloads/V
(referred as~/Documents/../Downloads/V
) instead of~/Documents/ViberDownloads
by invokingsudo sed -i.original 's/ViberDownloads/..\/Downloads\/V/g' /opt/viber/Viber
.