Question: I export my bookmarks from Firefox as a CSV file, and use other macros to work with them in Excel.
My question is, why does the CSV have to be in the same folder as the BAT file that I use to delete it?
If I export the CSV to Desktop or Temp, it doesn't do anything.
Is it some "shell" or security thing?
Here's the code below:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXCEL MACRO THAT RUNS THIS BAT FILE, WHICH EXPORTS THEM USING SQLITE:
Sub SQLite3_BAT_File(control As IRibbonControl)
Dim BAT_BOOKMARKS As String
BAT_BOOKMARKS = "C:\1\01\1 backup\a Bookmarks BAT files\a\Bookmarks.bat"
Call Shell(BAT_BOOKMARKS, vbNormalFocus)
End Sub
- - - - - - - - - -
@Echo OFF
"C:\Program Files (x86)\SQLite3\sqlite-tools-win32-x86-3210000\sqlite3.exe" < "C:\1\01\1 backup\a Bookmarks BAT files\a\Bookmarks View.txt"
EXIT
- - - - - - - - - -
Bookmarks View.txt
.open C:/Users/USER/AppData/Roaming/Mozilla/Firefox/Profiles/u689l7dh.default/places.sqlite
.mode csv
.once "C:/1/01/1 backup/a Bookmarks BAT files/c/output.csv"
SELECT a.id AS ID, a.title AS Title, b.url AS URL, datetime(a.dateAdded/1000000,'unixepoch','localtime') AS Date FROM moz_bookmarks AS a JOIN moz_places AS b ON a.fk = b.id;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXCEL MACRO THAT DELETES THE CSV:
Sub output_csv_del_DOS(control As IRibbonControl)
Dim DELETE_CSV As String
DELETE_CSV = "C:\1\01\1 backup\a Bookmarks BAT files\c\output csv del DOS.bat"
Call Shell(DELETE_CSV, vbNormalFocus)
End Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Echo OFF
DEL "C:\1\01\1 backup\a Bookmarks BAT files\c\output.csv"
EXIT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Here's my "How To" to share, if you're interested:
bookmarks-to-CSV.pdf . . . This is a .pdf that I have made, and uploaded to my Google Docs . . . This first page provides all you need to know, to get your Firefox Bookmarks into a .csv file using SQLite3. This won't do anything to your Bookmarks, it just extracts a copy of them . . . Then, the next few pages provide the details of what's going on . . . Having the .csv, you can then use Excel macros to clean up garbage characters in the .csv, and then append them to other Bookmarks in an .xlsm . . . Within the .xlsm, further edit them, categorize (I do this on 18 fields), and sort (concatenate(concatenate)) (22K Bookmarks) . . . Then, you can do Boolean searches, or use the Advanced Filter! . . . bookmarks-to-CSV.pdf
My question is, why does the CSV have to be in the same folder as the BAT file that I use to delete it?
If I export the CSV to Desktop or Temp, it doesn't do anything.
Is it some "shell" or security thing?
Here's the code below:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXCEL MACRO THAT RUNS THIS BAT FILE, WHICH EXPORTS THEM USING SQLITE:
Sub SQLite3_BAT_File(control As IRibbonControl)
Dim BAT_BOOKMARKS As String
BAT_BOOKMARKS = "C:\1\01\1 backup\a Bookmarks BAT files\a\Bookmarks.bat"
Call Shell(BAT_BOOKMARKS, vbNormalFocus)
End Sub
- - - - - - - - - -
@Echo OFF
"C:\Program Files (x86)\SQLite3\sqlite-tools-win32-x86-3210000\sqlite3.exe" < "C:\1\01\1 backup\a Bookmarks BAT files\a\Bookmarks View.txt"
EXIT
- - - - - - - - - -
Bookmarks View.txt
.open C:/Users/USER/AppData/Roaming/Mozilla/Firefox/Profiles/u689l7dh.default/places.sqlite
.mode csv
.once "C:/1/01/1 backup/a Bookmarks BAT files/c/output.csv"
SELECT a.id AS ID, a.title AS Title, b.url AS URL, datetime(a.dateAdded/1000000,'unixepoch','localtime') AS Date FROM moz_bookmarks AS a JOIN moz_places AS b ON a.fk = b.id;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXCEL MACRO THAT DELETES THE CSV:
Sub output_csv_del_DOS(control As IRibbonControl)
Dim DELETE_CSV As String
DELETE_CSV = "C:\1\01\1 backup\a Bookmarks BAT files\c\output csv del DOS.bat"
Call Shell(DELETE_CSV, vbNormalFocus)
End Sub
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Echo OFF
DEL "C:\1\01\1 backup\a Bookmarks BAT files\c\output.csv"
EXIT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Here's my "How To" to share, if you're interested:
bookmarks-to-CSV.pdf . . . This is a .pdf that I have made, and uploaded to my Google Docs . . . This first page provides all you need to know, to get your Firefox Bookmarks into a .csv file using SQLite3. This won't do anything to your Bookmarks, it just extracts a copy of them . . . Then, the next few pages provide the details of what's going on . . . Having the .csv, you can then use Excel macros to clean up garbage characters in the .csv, and then append them to other Bookmarks in an .xlsm . . . Within the .xlsm, further edit them, categorize (I do this on 18 fields), and sort (concatenate(concatenate)) (22K Bookmarks) . . . Then, you can do Boolean searches, or use the Advanced Filter! . . . bookmarks-to-CSV.pdf