Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 06, 2016, 01:49:35 PM
  • Proudly celebrating 10 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 10201 times)

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • 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 :
http://www.donationc...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: 2,779
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #1 on: August 22, 2015, 03:17:22 AM »
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:57 AM by Ath »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,285
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #2 on: August 22, 2015, 07:23:54 AM »
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: 10,325
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #3 on: August 22, 2015, 02:08:14 PM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #4 on: August 23, 2015, 10:45:05 AM »
 :-[

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: 10,325
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #5 on: August 23, 2015, 11:36:50 AM »
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: 10,325
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #6 on: August 23, 2015, 11:40:13 AM »
@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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #7 on: August 23, 2015, 12:58:18 PM »
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   http://www.donationc...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:54 PM by Contro »

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #8 on: August 23, 2015, 01:02:25 PM »
http://www.donationc...ex.php?topic=41464.0 Transfer all opened tabs in browser to a txt file

This part is solved

 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #9 on: August 23, 2015, 01:03:48 PM »
I am searching the entire web.
I have find something in batch, delphi, but not in ahk yet.
 :-[

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #10 on: August 23, 2015, 01:41:07 PM »
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:31 PM by Contro »

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,139
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #11 on: August 23, 2015, 11:21:22 PM »
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: 4,474
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #12 on: August 24, 2015, 01:55:44 AM »
I have to ask:
  • What will you do with/How will you access/use those shortlinks in that folder?

OpenURL as he mentions here.

Quote
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #13 on: August 24, 2015, 09:28:25 AM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #14 on: August 24, 2015, 09:40:06 AM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #15 on: August 24, 2015, 09:44:47 AM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #16 on: August 24, 2015, 10:16:33 AM »
This may be a good link for a good programmer :  good link

 :-[

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,474
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #17 on: August 24, 2015, 11:00:41 PM »
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:21 PM by 4wd »

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #18 on: August 25, 2015, 07:23:50 AM »
Just trying with no support
 ;D :tellme:

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #19 on: August 25, 2015, 07:34:35 AM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #20 on: August 25, 2015, 07:38:39 AM »
 :-\

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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #21 on: August 25, 2015, 07:43:12 AM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #22 on: August 25, 2015, 07:51:46 AM »
It seems easy. Perhaps i will finish in the weekend
 :Thmbsup:

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #23 on: August 25, 2015, 03:56:00 PM »
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

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: create shortlinks to urls in a folder from a txt file with the url list
« Reply #24 on: August 25, 2015, 04:53:46 PM »
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
 :-*