|
|
|
|
![]() ![]() |
Oct 7 2006, 04:10 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 18-June 06 From: Croatia, Zagreb Member No.: 25,336 |
Here s the thing. I have large number of folders with files in it. i need to copy folders but without files in it, becuase i dont want to write folders name manually( i have about 5000 folders) and i guess i wont be quickly finished.
why would i wanted to do that. it s kinda like this: you have dvd file and you want to record the soundtrack into mp3 file. but you want to save them on other disc. its easy with 1-10 folders but i have situation with 5000 folders and i need to do this. so can anyone please help me? |
|
|
|
Oct 7 2006, 04:52 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
Php scripting could handle this. It wouldn't be too difficult, actually.
Reading the Directory structure recursively from a top level directory and using the mkdir() function to create another similarly named folder in another disk location. There are scripts around which perform sitemaps by reading the contents of a site and listing the file names as links. Borrowing from the logic used in the sitemap script, simply use the mkdir() function to create a new blank folder elsewhere, and maybe chmod() the folders to whatever permissions you chose during the building of them. Check at [ hotscripts dot com ] to see what they have along the lines of a sitemap application and modify that, maybe? Of course, you would need an input form to indicate the starting point for the recursive search and to input the new path for the empty folders. But it would be doable. Unfortunately(?), I am busy with other stuff and am not able to do this for you, so if the task at hand is beyond your knowledge, enlist someone to assist with the scripting. Or Google on it. Perhaps someone has an available script out there??? Keep us posted as to how it goes. Perhaps a Tutorial might come out of it? |
|
|
|
Oct 7 2006, 05:26 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 18-June 06 From: Croatia, Zagreb Member No.: 25,336 |
i founded this soulution but i dont know how to use it
http://www.ozzu.com/ftopic68389.html can anyone tell me where do i have to enter this command |
|
|
|
Oct 7 2006, 05:37 PM
Post
#4
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
(assuming you have windows machine)
Click Start > run > xcopy blah.... as per that forum posting Make sure to specify the start and destination folders as fullpaths, like: c:\windows\etc... |
|
|
|
Oct 7 2006, 06:03 PM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 287 Joined: 18-June 06 From: Croatia, Zagreb Member No.: 25,336 |
i got it. problem solved and i ll write small tutorial.
number of folders 6.668. and they were all copied in 20 seconds. thanks jlhaslip |
|
|
|
Oct 7 2006, 09:02 PM
Post
#6
|
|
|
Desperately seeking "any key" to continue... ![]() Group: Admin Posts: 3,434 Joined: 23-April 05 From: Trap17 storage box Member No.: 6,042 |
Ah... xcopy... ye olde DOS 3.3 command circa 1987. For more information of xcopy take a look at http://www.computerhope.com/xcopyhlp.htm and Microsoft
This is just a comment that soon people will not know what a calculator is or a rotary dial and pulse... |
|
|
|
Oct 7 2006, 09:12 PM
Post
#7
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,882 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
I remember the "crank up" phones.
An Aunt and Uncle had one on their Farm... ah... the memories of that place... And thank you's appreciated. Glad to help. |
|
|
|
Oct 11 2006, 11:17 AM
Post
#8
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 220 Joined: 30-October 05 Member No.: 13,574 |
It depends what OS he is using , with unix (or linux) you can do this job easy with shell scripting.
Simply read the foldername and create the folder on the other disk. For Windows is that job a bit harder with a MS-DOS batch file you can create folders but reading the name from a external source maybe a problem. I should suggest you use Visual Basic (or VB script). There you can use the command DIR (to get the foldernames) and you can also create folders. If you give an example the script can be easly written , it will be a about 10 or 20 lines. You can start the VB script with Internet Explorer (if you haven't disabled this). |
|
|
|
![]() ![]() |
Similar Topics