How could I do this?

A cure for all your hardware/software ailments.

Moderators: SCUMBAG, INKoRP, spud, GURU, Clan Leader

User avatar
jof
Clan Member
Posts: 372
Joined: Thu Oct 05, 2006 8:10 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

How could I do this?

Postby jof » Fri Jan 26, 2007 6:05 pm

I've got a directory. Inside the directory I have a shitload of sub directories. Inside each sub directory is a number of files. I want to move all the files from all the sub directories into one folder - preferably renaming them if the same filename already exists.

Don't let me down my fellow geeks!

PS: I have defragged several times and to my dismay the files didn't move to the folder I wanted them to.

User avatar
jof
Clan Member
Posts: 372
Joined: Thu Oct 05, 2006 8:10 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Postby jof » Fri Jan 26, 2007 6:07 pm

In case I didn't make it obvious I want to automate this as there is a metric shitload of sub directories and it would taker forever and I cbf doing it.

User avatar
spud
Wiggles
Posts: 695
Joined: Wed Oct 04, 2006 6:12 pm
Location: The Can
Contact:

Postby spud » Fri Jan 26, 2007 7:55 pm

My suggestion is a tool that takes 2 arguments - a directory to start from, and a directory to copy to - which recursively moves all files under arg1 into arg2, renaming files with names that already exist in arg2. My suggestion is some higher level language such as perl or java. Note that this would be incredibly easy in Linux. Have fun! :D

User avatar
BUSTER
Clan Member
Posts: 364
Joined: Fri Oct 13, 2006 2:56 pm
Location: Vic
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Postby BUSTER » Fri Jan 26, 2007 7:58 pm

Try overclocking your CPU :wink:
OOPS DID I ASK FOR SOMETHING?

User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Fri Jan 26, 2007 7:59 pm

Lol if no one can find a solution.... gimme a bit :P


edit: mid coding :P
The distance between insanity and genius is measured only by success

User avatar
spud
Wiggles
Posts: 695
Joined: Wed Oct 04, 2006 6:12 pm
Location: The Can
Contact:

Postby spud » Fri Jan 26, 2007 8:04 pm


User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Fri Jan 26, 2007 8:16 pm

Attachments
CopyFile.zip
(182.6 KiB) Downloaded 219 times
Last edited by Kamikazee on Tue Mar 27, 2007 8:17 pm, edited 2 times in total.
The distance between insanity and genius is measured only by success

User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Fri Jan 26, 2007 8:16 pm

The distance between insanity and genius is measured only by success

User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Fri Jan 26, 2007 8:21 pm

Attachments
CopyFile(vb).zip
(1.06 MiB) Downloaded 211 times
Last edited by Kamikazee on Tue Mar 27, 2007 8:13 pm, edited 3 times in total.
The distance between insanity and genius is measured only by success

User avatar
jof
Clan Member
Posts: 372
Joined: Thu Oct 05, 2006 8:10 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Postby jof » Fri Jan 26, 2007 8:23 pm


User avatar
GURU
Clan Member
Posts: 739
Joined: Wed Oct 04, 2006 4:18 pm
Location: Planet EARTH
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Postby GURU » Fri Jan 26, 2007 8:55 pm

long live the P U T E Y ! :)

User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Fri Jan 26, 2007 9:31 pm

nps jof :D

lol i might neaten that up at some point so its not so ugly to use :P
Which might be a month or so as im heading out field for 20 odd days on sunday.
The distance between insanity and genius is measured only by success

User avatar
Leone
Clan Member
Posts: 493
Joined: Wed Oct 18, 2006 1:57 pm
Location: Brisbane!
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Postby Leone » Sat Jan 27, 2007 1:57 am

Yeah, but you could add it into the "Handy Free Apps" thread if you tidy it up :D

User avatar
blink
Admin
Posts: 1067
Joined: Tue Oct 03, 2006 8:12 pm
Location: Perth
Contact:

Postby blink » Sat Jan 27, 2007 3:15 am

Yay, now all of jof's porn is stored conveniently into the single directory!
You and your red fabric robe, glasses and peace pipe in your mouth for that damned split second!

User avatar
Kamikazee
Admin
Posts: 985
Joined: Tue Oct 03, 2006 8:07 pm
Location: /dev/null
Contact:

Postby Kamikazee » Sat Jan 27, 2007 3:46 am

Well, i cleaned up the interface abit :) ... the files above are now the current updates ones.
The distance between insanity and genius is measured only by success


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “Spud n GURU's Tech Topics”

Who is online

Users browsing this forum: No registered users and 1 guest