MusicOnly 0 Report post Posted October 7, 2006 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? Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted October 7, 2006 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? Share this post Link to post Share on other sites
MusicOnly 0 Report post Posted October 7, 2006 i founded this soulution but i dont know how to use ithttp://www.ozzu.com/mswindows-forum/copy-zip-directory-structure-only-t68389.htmlcan anyone tell me where do i have to enter this command Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted October 7, 2006 (assuming you have windows machine)Click Start > run > xcopy blah.... as per that forum postingMake sure to specify the start and destination folders as fullpaths, like: c:\windows\etc... Share this post Link to post Share on other sites
MusicOnly 0 Report post Posted October 7, 2006 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 Share this post Link to post Share on other sites
BuffaloHelp 24 Report post Posted October 7, 2006 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... Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted October 7, 2006 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. Share this post Link to post Share on other sites
kdr_98 0 Report post Posted October 11, 2006 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). Share this post Link to post Share on other sites