topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday March 29, 2024, 10:22 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 31188 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
create shortlinks to urls in a folder from a txt file with the url list

With a list of urls in a txt file create shortlinks in a folder to those urls

By example :
https://www.donation...tion=post;board=71.0
https://drive.google...m/drive/u/0/my-drive
http://www.google.com/analytics/
http://www.meetup.co...ev/events/223984866/

Will create four shortlinks in a folder in the desktop of our election.

Is it possible ?

Best Regards

 :-[

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • 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...
« Last Edit: August 22, 2015, 03:28 AM by Ath »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • 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...

Also I thought somebody wrote a script for another poster that created .url shortcuts from  links in a text file.  It was not too long ago.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • 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...

Also I thought somebody wrote a script for another poster that created .url shortcuts from  links in a text file.  It was not too long ago.

yes, there was a thread on the topic anyways - saw it when searching for the other related threads...
@Contro, try searching for:
url text file
Tom

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
 :-[

trying to search. Was with good intention. I have understand all except how transfer urls to files contained in a folder.

Really is this solved ?
 :-*

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Also I thought somebody wrote a script for another poster that created .url shortcuts from  links in a text file.  It was not too long ago.

yes, there was a thread on the topic anyways - saw it when searching for the other related threads...

I'm not having any luck find it again though :-(
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
@Contro,
the problem was that you posted three very similar requests in three different threads - that makes it confusing and difficult for people to help.


Edit// could you post links to the other two threads?
Tom

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Really difficult to find this part.
I have assumed the other parts solved.
This is a special for a difficult one.

Edit// could you post links to the other two threads?
Sure
This ones :
Transfer all the opened urls to a folder   https://www.donation...ex.php?topic=41465.0
The prior post is not solved because the addons only gives export to a txt file.
So this post tries to get the script to put down a folder with urls from a txt file, that is partially solved.

FROM A TXT FILE TO FOLDER IS PENDING
FROM TABS DIRECTLY TO FOLDER IS PENDING


« Last Edit: August 23, 2015, 01:33 PM by Contro »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
https://www.donation...ex.php?topic=41464.0 Transfer all opened tabs in browser to a txt file

This part is solved

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am searching the entire web.
I have find something in batch, delphi, but not in ahk yet.
 :-[

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
This addon have a comment suggesting what we want :

https://addons.mozil.../addon/save-my-tabs/

 by alexg on April 4, 2015 · permalink · translate

suggestion:
- add an option of never auto saving
- add a manual save option of all urls (as button and as context menu) to a selected folder

 :-*

I supposed is not a bookmark folder....
 :o
« Last Edit: August 23, 2015, 02:40 PM by Contro »

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • 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.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
I have to ask:
  • What will you do with/How will you access/use those shortlinks in that folder?

OpenURL as he mentions here.

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

Making multiple posts a few minutes apart doesn't really help either, (Contro, not you IainB :) ).

So to sum up:
  • A program to copy the URLs of open tabs to a text file. - Apparently solved
  • A program to create shortcuts in a folder on the Desktop, of the URLs listed in a text file.
  • A program to create shortcuts in a folder on the Desktop, of the URLs of the tabs open in Firefox.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I have found this. For me is difficult, but I am sure is a possible way to do it :

Shortcut v1.11 (Shortcut.exe)   Last Updated: 07/04/2005

Allows you to create, modify or query Windows shell links (shortcuts) from the command-line. You can export the properties of an existing shortcut to a text file in .INI format. Use 'Shortcut /?' to view the syntax.

Requirements: Windows 95 or later
Compiled from Language: C++

from shorcuts creator

If from AHK is possible to go across a txt file (I know is possible) , then executing the shortcut.exe for every line

do while .not. eof() or something similar
enddo

 :-[

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Another possible way to face the problem is :

Creating multiple Windows URL shortcuts from a bookmarks HTML file

4wd has defined me perfectly well.

I also make myself the same questions IainB does .

I have many possible answers of course but one of them is because the window folder, window file are the most simple concepts from the operating systema DOS 6.0 .

I have lost in the past a lot of time because every program and every system tries to remain me captive of formats and special transitions.

That's why i am trying in this "more simple way" that turn into a confusional and difficult way .

But is my way.

We process information : A good friend of mine, with limited knowledges, use the windows folders and files as a sort of powerful database.

When he need something he goes to his folders.....

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Recently I updates one of the pc to windows 8.1
Then i have to recover my bookmarks for : opera, ie (now Edge no se que más...) , firefox, chrome, safari,.... )

I want folders that will go fine with OpenURL under any version of operating systems.


Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
This may be a good link for a good programmer :  good link

 :-[

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,641
    • View Profile
    • Donate to Member
Disclaimer: The following is an example of how it could be done using Powershell v3+.  It has no error checking, >>> no support <<<.

Purely done to give someone else an idea and because I needed the mental exercise.

It uses information and script from:
Get list of open tabs
Remove illegal characters
Creating Desktop shortcuts


It will create a folder called Tabs-yyyymmddhhmmss on the Desktop, it will create shortcuts using the first 15 (if possible) characters of the page title plus a random number between 1 and 1000, eg. All Unread Topi_44.url purely as a simple method to try and avoid name collision.

It's been tested on Firefox 40.0.2 and will probably work on other Mozilla based browsers providing you point it to the equivalent JSON file and it's object order is the same, (otherwise just edit the object references).

NOTE: The creation/updating of the session file, (recovery.js), lags a little behind what you see in the browser, (up to about 30 seconds or so).

Tested with portable browsers.

It requires Powershell v3.0+

It can be run using the icon or from the CLI: powershell.exe -noprofile -executionpolicy bypass -File "<path to>\JSON2Shortcut.ps1"

DO NOT forget to edit the icon properties if it's not in the same folder as the Powershell script.

BIGGER DISCLAIMER: It worked on my system, it's guaranteed you'll say it doesn't work on yours.  Reread the first line.

Updated, see this post - now outputs to shortcuts and/or text file.
« Last Edit: September 30, 2015, 11:32 PM by 4wd »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Just trying with no support
 ;D :tellme:

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
It seems i have already powershell. Trying to locate :

"Installing Windows PowerShell on Windows 8 and Windows Server 2012

Windows PowerShell 3.0 arrives installed, configured, and ready to use. Windows PowerShell Integrated Scripting Environment (ISE) is installed and enabled. For information about starting Windows PowerShell, see Starting Windows PowerShell on Windows 8 and Starting Windows PowerShell on Windows Server 2012."

 :P

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
 :-\

It is hard to find the PowerShell 3.0 download. That is because the only way to get it is to download the Windows Management Framework 3.0. PowerShell 3.0 is part of that.

http://www.microsoft...etails.aspx?id=34595

It is hard to find the PowerShell 3.0 download. That is because the only way to get it is to download the Windows Management Framework 3.0. PowerShell 3.0 is part of that.

Supported Operating System

Windows 7 Service Pack 1, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2

    IMPORTANT: Windows Management Framework 3.0 is not currently compatible with the following applications:
        System Center 2012 Configuration Manager. For more information, see KB 2796086.
        System Center Virtual Machine Manager. For more information, see KB 2795043.
        Microsoft Exchange Server 2007 and Microsoft Exchange Server 2010. For more information, see Windows Management Framework 3.0 on Exchange 2007 and Exchange 2010.
        Microsoft SharePoint 2010. For more information, see Windows PowerShell 3.0 and SharePoint 2010.
        Windows Small Business Server 2008 and Windows Small Business Server 2011. For more information, see Windows Management Framework 3.0 applicability on Windows Small Business Server 2008/2011 Standard.


i have windows 8.1
 :-[

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I found a lot of entries under windows 8.1

like this one : C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
It open a new and wonderful programmer environment (i suppose)
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
It seems easy. Perhaps i will finish in the weekend
 :Thmbsup:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • 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

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
I am studying now :

http://json.org/
jsonviewer http://jsonviewer.stack.hu/
Scripting with Windows PowerShell

Only for trying not to be only imitate.
I am in the Sancta Sanctorum of the programmer
 :-*