Author Topic: Files vanishing  (Read 15592 times)

0 Members and 1 Guest are viewing this topic.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #15 on: November 10, 2013, 04:15:40 pm »
guys, one of the key things was echoing the content because the names on recoverd files are all only numbers.........(still thanks :3 )
It would also be cool if it worked recrusive :D
« Last Edit: November 10, 2013, 04:16:48 pm by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Files vanishing
« Reply #16 on: November 10, 2013, 05:10:11 pm »
Code: [Select]
import os, sys, glob, shutil, fnmatch

matches = []
for root, dirnames, filenames in os.walk(sys.argv[1]):
        for filename in fnmatch.filter(filenames, '*.h'):
                matches.append(os.path.join(root, filename))
        for filename in fnmatch.filter(filenames, '*.txt'):
                matches.append(os.path.join(root, filename))

print(matches)

dest=sys.argv[2]

for f in matches:
keep=input("Do you want to keep "+f)
if keep=='':
keep = old
if keep=='r' or keep=='n':
os.remove(f)
elif keep=='k' or keep=='y':
print(dest+os.path.split(f)[1])
shutil.copy(f,dest+os.path.split(f)[1])
else:
print("You need to use a valid command y/k keep or r/n remove")
old = keep
recursive and tested. It will also remember your last answer so you can just press enter to continue going with keep/remove without having to retype.
EDIT: the first argument is the directory to search through the second is where to put them.
« Last Edit: November 10, 2013, 05:10:47 pm by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #17 on: November 10, 2013, 05:11:23 pm »
Thank you, but i am already using ben_gs one D:

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: Files vanishing
« Reply #18 on: November 10, 2013, 05:17:27 pm »
* ruler501 didn't realize ben_g had posted one
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #19 on: November 11, 2013, 12:34:59 pm »
Ok, how the hell is this possible, when doing a backup of my other files i randomley looked at the terminal output - and aparently my desktop got moved into my jedi academy source folder O.O HOW THE HAY is that possible O.O

Anyways, the good news is that i still have all the files then! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: Files vanishing
« Reply #20 on: November 11, 2013, 12:41:00 pm »
Ok, how the hell is this possible, when doing a backup of my other files i randomley looked at the terminal output - and aparently my desktop got moved into my jedi academy source folder O.O HOW THE HAY is that possible O.O
Anyways, the good news is that i still have all the files then! :D
I told'ya, after a couple of scary days you just might get lucky! Good to hear. Now you can get some extra sleep.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #21 on: November 11, 2013, 12:42:10 pm »
Ok, how the hell is this possible, when doing a backup of my other files i randomley looked at the terminal output - and aparently my desktop got moved into my jedi academy source folder O.O HOW THE HAY is that possible O.O
Anyways, the good news is that i still have all the files then! :D
I told'ya, after a couple of scary days you just might get lucky! Good to hear. Now you can get some extra sleep.

Sleep? What is that?

Anyways, it is still kinda wierd that it somehow got moved there.
Well, i'm backing up more now anyways, seing I just bought a 2TB hard drive for that purpose :)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Files vanishing
« Reply #22 on: November 11, 2013, 12:43:27 pm »
* Streetwalker doesn't backup, as his calc folder is synced to DropBox :P

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #23 on: November 11, 2013, 12:44:34 pm »
I don't use cloud services, sorry, I just don't feel good by giving random people all my files :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Files vanishing
« Reply #24 on: November 11, 2013, 12:55:48 pm »
Lol. Dropbox is pretty reliable AFAICT. I even trust Google. Seriously, what would they do with your data ? It's just processed by software, and thay don't sell it to more random people. ;)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Files vanishing
« Reply #25 on: November 11, 2013, 01:04:20 pm »
id, but i guess i should start using the 20gb backup web-space i have that comes with my vps for the most important data, lol

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Files vanishing
« Reply #26 on: November 11, 2013, 03:50:26 pm »
Wow I'm glad that you got your files back. It seems weird. Backup more often in the future in case this happens again (or worse, the files automatically get deleted for real)