topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 4:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: create shortlinks to urls in a folder from a txt file with the url list  (Read 33917 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Given that you have a textfile with one URL per line then this autohotkey script should do the trick. Adjust the paths to what folders you'll use.
Loop, Read, C:\folder\textfilewithoneURLperline.txt
{
name := StrReplace(A_LoopReadLine,"http://","")
name := StrReplace(name,"https://","")
name := SubStr( RegExReplace(name, "[/<>\?\\:*\|]"," ") , 1, 70)
IniWrite, A_LoopReadLine, C:\urlfolder\%name%.url, InternetShortcut, URL
}

If you use Firefox then maybe FFBookmarkUnpack may be of use to do a one time unpack of all your firefox bookmarks into subfolders with .url files, http://nod5.dcmember...ookmarkunpacker.html


The ahk script works very well too.
Best Regards


« Last Edit: August 26, 2015, 10:19 AM by Contro »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Just studying and re-linking an re-vising and re-memoring .
Damn Memory !!!!!!!!!!!!

I have shortcutty from Nod5
*** JOSE ***  June 4, 2010 at  1:24am
   Shortcutty

Overview:

Shortcutty adds a context menu entry to Explorer to create a shortcut and place it in another folder.
The (optional) companion tool Shortcutta moves shortcuts from a folder to the active Explorer window's folder when a hotkey is pressed.

I am trapped now with FileNotes.


I also found a script from Ewemoa about shortcuts

And diving in the wonderful world of JSON

Wait for me , eh . I don't have a quick and easy answer...

 :P

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I need to reiniate now.
I am observing the cursor thinking.
I have adopted again shortcutty.
I like alto FileNoter.
After strange behavior with Everything bookmarks seems not appear . I have several. But finally i go to the folder and process in the ini file of ffbookunpacker .
Seems perfect and very powerful.
But i have the cursor blinking sometimes and need to reiniate.
A strange thing happen to me was the false dissapearing of an "unpacker" folder i create in my desktop. But was here.
 :-[

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Trying again with Everything
In the closing i receive error about BtTray.exe , seem to be related with bluetooth device.
now the bookmarks.html appear with 28959 kb . Before was 8 kb and seems to be dissapeared, but the value was correct inspecting the folder.
So seems Everything.
I have now a powerful unpacker folder created by ffbookmarksunpacker
If I move the cursor out of this edit window the thinking circle in windows 8.1 appear. Is normal ?
Well i am going to put ffbookmarksunpacker in the startup folder.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I launch ffbookmarksunpacker.exe with 15 seconds delayed with startup delayed
 :P

I continue with JSON world and the scripts from 4wd

Best Regards

Thanks a lot Nod5 for good scripting

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Given that you have a textfile with one URL per line then this autohotkey script should do the trick. Adjust the paths to what folders you'll use.
Loop, Read, C:\folder\textfilewithoneURLperline.txt
{
name := StrReplace(A_LoopReadLine,"http://","")
name := StrReplace(name,"https://","")
name := SubStr( RegExReplace(name, "[/<>\?\\:*\|]"," ") , 1, 70)
IniWrite, A_LoopReadLine, C:\urlfolder\%name%.url, InternetShortcut, URL
}

If you use Firefox then maybe FFBookmarkUnpack may be of use to do a one time unpack of all your firefox bookmarks into subfolders with .url files, http://nod5.dcmember...ookmarkunpacker.html


The ahk script works very well too.
Best Regards




Sorry i edited this post.

As i said the script works wonderfully
Best Regards
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Do you really need 3 threads in this forumsection to ask 3 times the same question? :(

Oh, and the other 2 already have been answered properly, too...

Ath i can't access your web :

Lost connection to MySQL server at 'reading initial communication packet', system error: 111

Best Regards

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
The OP says: "...create shortlinks to urls in a folder ...in the desktop of our election ... from a txt file with the url list.
I have to ask:
  • Why?
  • What will you do with/How will you access/use those shortlinks in that folder?
  • What's wrong with using Bookmarks?

Also, yes, your making 3 or so overlapping posts on the same subject is somewhat confusing.

I am revising my bookmarks because i have a lot of problemas syncronizing in the past.
Folders with urls repeated even ten or more times.
Folders repeated everywhere and so on

I know where are the security copies.
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am with Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js

is in a data disk
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Now the difficult part.

I have to modify the line

C:\> powershell.exe -noprofile -executionpolicy bypass -File ".\JSON2Shortcut.ps1"


I opened a console and try
The command seems recognigzed. So good for me.


The prior command is the script is in my desktop would be :

C:\> powershell.exe -noprofile -executionpolicy bypass -File ".\JSON2Shortcut.ps1"

C:\> powershell.exe -noprofile -executionpolicy bypass -File "C:\Users\JOSE\Desktop\JSON2Shortcut.ps1"

I will revise now the links
perhaps is better first to try to put the JSON2Shortcut.ps1 in the same directory than powershell.exe....

 :-[



Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am revising too if i really have version 3
C:\Windows\System32\WindowsPowerShell\v1.0

 :o

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
It seems the version correct because of your links.

But for me don't go.
I need support. So i am going to a JSON forum

Anyone knows one ?

Best Regards

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
I am with Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js

Code: PowerShell [Select]
  1. if (!(Test-Path -Path "Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js")) { Exit }
  2. $opentabs = (Get-Content "Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js") | ConvertFrom-Json  # Firefox

C:\> powershell.exe -noprofile -executionpolicy bypass -File "C:\Users\JOSE\Desktop\JSON2Shortcut.ps1"

If it's on your Desktop why aren't you running it from the shortcut it came with, (ie. put the shortcut on the Desktop also)?
« Last Edit: September 02, 2015, 07:53 AM by 4wd »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am with Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js

Code: Text [Select]
  1. if (!(Test-Path -Path "Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js")) { Exit }
  2. $opentabs = (Get-Content "Y:\FIREFOX PERFILES\PEPE\sessionstore-backups\recovery.js") | ConvertFrom-Json  # Firefox

C:\> powershell.exe -noprofile -executionpolicy bypass -File "C:\Users\JOSE\Desktop\JSON2Shortcut.ps1"

If it's on your Desktop why aren't you running it from the shortcut it came with, (ie. put the shortcut on the Desktop also)?

It's running well now.
The scripts includes the pinned tabs from the active session i suppose.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Nod5 I am having doubts with :

"If you use Firefox then maybe FFBookmarkUnpack may be of use to do a one time unpack of all your firefox bookmarks into subfolders with .url files, http://nod5.dcmember...ookmarkunpacker.html"

I have been modifying my bookmarks.
And finally when reiniate the system o execute the program I don't get the shortlinks. Only the empty folders.
I even delete the entire folder and repeat but just the same.
I only obtaining empty folders.



Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am repeating the experience with the original ahk file but happen the same.
By some reason the script don't go in my system now.

the ini file is :
;-- 1. Set an unpack folder where bookmarks are copied
;-- 2. Set Firefox profile folder
;-- note: to find the profile folder, type about:support and enter in Firefox,
;-- and then click "Show Folder" on the page that loads
[options]
unpack_folder=C:\Users\JOSE\Desktop\Unpacker
profilefolder=Y:\FIREFOX PERFILES\PEPE


I am executing from the same directory where the ini file is

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
 ;D
At least seems i have discovered the problem with the thinking circle of the windows 8.1 cursor

It seems associated to Asus Smart Gesture Loader.
I kill the process and finish the problem


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
;D
At least seems i have discovered the problem with the thinking circle of the windows 8.1 cursor

It seems associated to Asus Smart Gesture Loader.
I kill the process and finish the problem



Sounds like a nice gesture indeed.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Do you really need 3 threads in this forumsection to ask 3 times the same question? :(

Oh, and the other 2 already have been answered properly, too...

Solved !  I can enter in your web now.
 :-*

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
;D
the contrast there between the quote and the response just made my evening :-*
Tom

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
;D
the contrast there between the quote and the response just made my evening :-*

 :-[
I am very engaged consulting in firefox forums about bookmarks
I am debugging why my system has so strange behaviour

I will inform
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
My first error : bookmarks.html is not the bookmark database in firefox (places.sqlite)

But for me now don't go ffbookmarksunpack.ahk . Only creates empty folders.
I have maintained the above database (places.sqlite) with a firefox addon places maintenance
i have tried in other pc with the same result.

But I could in the past with ffbookmarksunpack.ahk . So i am making something wrong i don't know

I think is time to ask for help to Nod5

 :P

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I have put to true in about:config
browser.bookmarks.autoExportHTML

and have located the profile firefox folder with
about:support - show folder -Y:\FIREFOX PERFILES\PEPE

closes firefox . execute ffbookmarksunpack.exe

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
In firefox forums the only related problem may be with :

Y:\FIREFOX PERFILES\PEPE

a space may be the problem with the script ?
 :-[

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #49 on: September 02, 2015, 10:41 AM »
Hi Contro. The paths can contain spaces, that is not the issue.

Are you sure you have the correct path to the profile folder?
My path has this format (the xi3je3ww.default part is the name of a folder not a file):
C:\Users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\xi3je3ww.default

Have you doublechecked that there is a file named bookmarks.html in the profile folder? (IIRC firefox writes to that file when the browser closes so you may have to close and restart Firefox in order for that file to appear.)

If there is a bookmarks.html in the profile folder then perhaps there is some language dependent variation in syntax that trips up the script. Could you post a small snippet from that file, a few lines that shows an url or two would be enough.

Another thing to check: perhaps there is a write permission issue. Test changing the output folder to something else e.g. C:\testfolder and see if that makes a difference.