Jump to content
xisto Community
Sign in to follow this  
MusicOnly

How To Duplicate Folders Without Copying Files In Them? hard question, isnt it?

Recommended Posts

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

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

i founded this soulution but i dont know how to use it

http://www.ozzu.com/mswindows-forum/copy-zip-directory-structure-only-t68389.html

can anyone tell me where do i have to enter this command

Share this post


Link to post
Share on other sites

(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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.