Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving folders

Status
Not open for further replies.

benett

Programmer
Oct 25, 2001
4
SE
Hi
My problem is that I have to move a bunch (real big bunch!) of folders on a regular basis. An example folder structure follows...

c:\Data\01\030401\some files...
c:\Data\01\030402\some files...
c:\Data\01\030501\some files...
c:\Data\01\030504\some files...
c:\Data\02\030501\some files...
c:\Data\02\030502\some files...
c:\Data\02\030504\some files...
c:\Data\02\030603\some files...


I wish to move (for an example) c:\data\0*\0305*\*.* to another location and keep the folder structure (h:\data\01\...). I need to change the selection "0305*" on a regulary basis also, so a easy way of doing this is important.

I've tried the search function in W2000, no problems to find the wanted folders. But I can´t find a way to move the folders and keep the orginal folder structure.

Please, I really need help with this... it's sooo boring moving the folders and files "by hand"...

It's really depressing to have to ask a thing like this, moving folders, sounds really easy, but...

Johan, Sweden


 
Are you moving everything from C:\Data to H:\Data - or just a selection? Have you looked at xcopy (xcopy /? for options) - or get hold of xxcopy (freely available on the internet) - more options?
 
Just a selection... I have looked at xcopy, the problem is to make the selection and the moving part... I need to use some kind of "*" in two of the folder names (data\0*\0305*\) to make a larger (and more complex) selection. But W2000 (or any OS) is not to happy about using "*" in folder names... :-(

xxcopy, thx for the tips, I will look in to that...
 
Have you ever looked at the 'for' command you can use in batch files? There are a number of expert exponents of it on these forums - and they have given examples for similar problems to yours. You could try searching the site - or hope one of then sees your post.
 
wolluf, you just made my day!

XXCOPY had all that I needed and a bit more... :)

Thx a lot!

/Johan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top