Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> How To Duplicate Folders Without Copying Files In Them?, hard question, isnt it?
MusicOnly
post 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?
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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?
Go to the top of the page
 
+Quote Post
MusicOnly
post 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
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



(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...
Go to the top of the page
 
+Quote Post
MusicOnly
post 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
Go to the top of the page
 
+Quote Post
BuffaloHELP
post Oct 7 2006, 09:02 PM
Post #6


Desperately seeking "any key" to continue...
Group Icon

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... smile.gif
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
kdr_98
post 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).
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Sata Hard Drive Not Recognized By Windows(12)
  2. Converting Video Files From One Format To Another(6)
  3. Read-only Folders In Xp(11)
  4. Does Anyone Know How To Make Exe Files(17)
  5. Linux Question: Amarok And File Permissions(4)
  6. The Reason Why People Get Drunk?(33)
  7. What Is God?(52)
  8. Speed Up Your Internet Explorer Fast As Firefox(17)
  9. Strange .log Files On My Desktop(10)
  10. Informix To Sql Server (or How To Open .unl Files)(2)
  11. How Hard Is It To Grow Up Being Disabled?(12)
  12. How To Disable "show Hidden Files And Folders" In Folder Option(11)
  13. Problem With My External Hard Disk(7)
  14. A Hard Question On Islam(13)
  15. Haha, This Isn't My Rant, But It's A Very Good One(4)
  1. Converting Audio Files In Vista(7)
  2. Mysql(2)
  3. Strange Isn't It...(0)
  4. Debug Exe Files(4)
  5. Msn My Sharing Folders(0)
  6. Help For My Seagate Sata Hard Drive!(7)
  7. 1350 Great Free Logos (jpg + Psd)(7)
  8. Best Way To Transfer Files(6)
  9. Jar Executable Files(1)
  10. Audio Files?(3)
  11. Fps/tps Co-op Games(1)
  12. Naming Web Page Files(5)
  13. How Can You Get Audio Files From Itunes Videos?(0)