Batch file help....

Started by
4 comments, last by Zahlman 14 years, 10 months ago
Anyone know how to go through a folder and it's sub-folders and copy across files of a certain type to another folder keeping the same folder structure but changing the name of the top directory. i have something like this, but it does not let me change to name os the folder to where the file should be copied, i want to copy to C:\data_temp folder... any ideas? for C:\data %%X in( .txt) do( copy %%X %%X )
Advertisement
xcopy /E \source\*.txt \destination
Do you *have* to do it in batch?
no, infact i find batch files a bit of pain. just want an easy scripting language that is flexiable. i will try the code suggested.
Quote:Original post by gameplayprogammer
no, infact i find batch files a bit of pain. just want an easy scripting language that is flexiable. i will try the code suggested.
VBScript or JScript are generally less of a headache, for future reference (both are available on the majority of installations of Windows). xcopy or robocopy are probably what you need here, though, as mentioned above. [smile]

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

In Python, this kind of thing can be done fairly neatly with os.walk.

This topic is closed to new replies.

Advertisement