Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How to replace links by one-click from backed up file hosting?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to replace links by one-click from backed up file hosting?

I've backed up my files from 1fichier to other file hosting. However changing every links one by one is not a fun process.
So how can I change every download links with backed up ones in my wordpress website?

Comments

  • HuntersPadHuntersPad Member
    edited February 2018

    I would assume you’d need to one by one. As the links are now completely different. If each link goes to a different file then you definitely have to change it one by one.

    And each link probably would have a different structure

    Thanked by 1filelover
  • raindog308raindog308 Administrator, Veteran

    filelover said: However changing every links one by one is not a fun process. So how can I change every download links with backed up ones in my wordpress website?

    Write a script.

  • @raindog308 said:

    filelover said: However changing every links one by one is not a fun process. So how can I change every download links with backed up ones in my wordpress website?

    Write a script.

    This is probably your only option. 1fichier is not that hard to script so first write a script that gets you a list of filenames + download ids then either write one that edits your wordpress site or hack up some javascript that does it on the fly.

  • wget --convert-links would have been easier, but sed is still your pal.

  • WSS said: but sed is still your pal

    This is the right answer

  • @WSS said:
    wget --convert-links would have been easier, but sed is still your pal.

    What is sed?

  • @filelover said:

    @WSS said:
    wget --convert-links would have been easier, but sed is still your pal.

    What is sed?

    It's your pal.

  • @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

  • @mksh said:

    @filelover said:

    @WSS said:
    wget --convert-links would have been easier, but sed is still your pal.

    What is sed?

    It's your pal.

    sedapal.com.pe

  • If you have links in database, then use this plugin

    If it's somewhere in theme or hardcoded in text, you may use sed with:

    find . -type f | xargs -0 sed -i '' -e 's/foo/bar/g'
    

    https://superuser.com/a/428494 - lil modified

  • @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

  • @WSS said:

    @mksh said:

    @filelover said:

    @WSS said:
    wget --convert-links would have been easier, but sed is still your pal.

    What is sed?

    It's your pal.

    sedapal.com.pe

    Yes, peruvian sed pals are the best.

  • @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    Links are in posts right? So as in database?

    Can you share me some example of both link structures?

  • @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    But why did you leave 1fichier so quickly? I mean, you could move over slowly, but before moving first consider how to treat the problem of links.

  • @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    But why did you leave 1fichier so quickly? I mean, you could move over slowly, but before moving first consider how to treat the problem of links.

    Not leaving. Just wanted to make a backup for future protection. Maybe 1fichier would be nuked in the near future idk.

  • @jetchirag said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    Links are in posts right? So as in database?

    Can you share me some example of both link structures?

    Yes links are in the database. That part is easy: Search and Replace Plugin.
    But how can I change each and every A filehosting link with filehosting B?

  • @filelover said:

    @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    But why did you leave 1fichier so quickly? I mean, you could move over slowly, but before moving first consider how to treat the problem of links.

    Not leaving. Just wanted to make a backup for future protection. Maybe 1fichier would be nuked in the near future idk.

    Okay, good, then your problem isn't so critical. But why so pessimistic about 1fichier? ;-)

    @jetchirag made a good suggestion above, but the problem of changing the links isn't going to be trivial.

    Thanked by 1jetchirag
  • @filelover said:

    @jetchirag said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    Links are in posts right? So as in database?

    Can you share me some example of both link structures?

    Yes links are in the database. That part is easy: Search and Replace Plugin.
    But how can I change each and every A filehosting link with filehosting B?

    Maybe if you can share example of link structure, I can tell something.

  • Archive your files before backing them up, would've made this a whole lot easier.

  • @jetchirag said:

    @filelover said:

    @jetchirag said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    Links are in posts right? So as in database?

    Can you share me some example of both link structures?

    Yes links are in the database. That part is easy: Search and Replace Plugin.
    But how can I change each and every A filehosting link with filehosting B?

    Maybe if you can share example of link structure, I can tell something.

    As you can see they both add different code into file urls:

    1fichier example:
    https://1fichier.com/?n1k4pq3z98

    Example filefactory link:
    http://www.filefactory.com/file/e8ljkyt541l/n/file.mkv.html

  • @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    But why did you leave 1fichier so quickly? I mean, you could move over slowly, but before moving first consider how to treat the problem of links.

    Not leaving. Just wanted to make a backup for future protection. Maybe 1fichier would be nuked in the near future idk.

    Okay, good, then your problem isn't so critical. But why so pessimistic about 1fichier? ;-)

    @jetchirag made a good suggestion above, but the problem of changing the links isn't going to be trivial.

    Just read this and 1fichier section: https://torrentfreak.com/us-govt-brands-torrent-streaming-cyberlocker-sites-as-notorious-markets-180115/

  • @filelover said:

    @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    But why did you leave 1fichier so quickly? I mean, you could move over slowly, but before moving first consider how to treat the problem of links.

    Not leaving. Just wanted to make a backup for future protection. Maybe 1fichier would be nuked in the near future idk.

    Okay, good, then your problem isn't so critical. But why so pessimistic about 1fichier? ;-)

    @jetchirag made a good suggestion above, but the problem of changing the links isn't going to be trivial.

    Just read this and 1fichier section: https://torrentfreak.com/us-govt-brands-torrent-streaming-cyberlocker-sites-as-notorious-markets-180115/

    Aight. Couldn't find anything useful in their APIs, seems you gotta do it the same old way.

  • @filelover said:

    @jetchirag said:

    @filelover said:

    @jetchirag said:

    @filelover said:

    @angstrom said:

    @filelover said: I've backed up my files from 1fichier to other file hosting.

    If you don't mind saying, which other file hosting?

    Filefactory. And their link structure is very different. Also I dont have knowledge on writing scripts. So its a tough process for me. A one-click link changing of every posts wouldnt be a option for me..

    Links are in posts right? So as in database?

    Can you share me some example of both link structures?

    Yes links are in the database. That part is easy: Search and Replace Plugin.
    But how can I change each and every A filehosting link with filehosting B?

    Maybe if you can share example of link structure, I can tell something.

    As you can see they both add different code into file urls:

    1fichier example:
    https://1fichier.com/?n1k4pq3z98

    Example filefactory link:
    http://www.filefactory.com/file/e8ljkyt541l/n/file.mkv.html

    (The filefactory link doesn't work, but this is a detail.)

    The problem is that there doesn't seem to be any discernible structure in the names of these links, so it's hard to see how a renaming of the links could be automated. (But perhaps I'm missing something.)

    I think that, in the long term, your best bet would be to set up your own file hosting server on which you could choose how to name the links and which would be easy to move to another server, if necessary.

Sign In or Register to comment.