How to delete thousands of files.
#1

Hello, I opened up my server a couple months ago, now after realizing how terrible this host is, I have decided I'm going to change server hosts to a new company.

Now I have to transfer 14000 registered files over to the directory of the new server.

I was thinking instead of moving them all over, I could save myself alot of time by removing all the files which have less then 1 hour online time, through a custom function placed under OnGameModeInit.

I've thought about how i'm going to do this for a while now, and I am starting to think that it is impossible.

If anyone has any experience doing something like this, it would help me alot.
Reply
#2

Once, I had this problem.

We deleted all the accounts.
Players who showed us their stats using a proof(pic), we gave them their stats.
Reply
#3

And that's why SQL is so handy, as one could just do "delete from users where onlinetime < 60" and be done.

Now, if you save files with the player's name as the title, you're going to have a hard time. If you have shell access (which I presume you don't) you could execute some batch/bash instructions to send the directory listing to a file and work from there.

I also saw some file manager plugin the other day (by JaTochNietDan IIRC). Maybe that can be used. I have no idea if it allows you to list directory contents, though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)