Microsoft
Software
Hardware
Network
Question : Batch file to copy folders with a certain name
Hi,
I am a programmer, but the for loops in DOS really confuse me. I've been struggling for the past 2 hours to figure this out. We have certain folders on one drive named "_DAILY". I would like to copy each folder named this to an external hard drive (using the same folder structure).
For instance take the output of this: dir /b /s D:\*_DAILY
and then for each filename do:
robocopy %copyDirectory% %destinationDirectory% /S
Thanks,
Jamie
Answer : Batch file to copy folders with a certain name
Give this a try, see if it gives you some ideas:
@echo off
set DestinationDirectory=X:\
for /F "tokens=*" %%A in ('dir /b /s "c:\*_daily"') do (
robocopy "%%A" %DestinationDirectory%" /S
)
~bp
Random Solutions
CMD utility to show shared network printers - Windows Server 2003
wireshark, snort, how do you look for a bit pattern from a pcap file
Entity-Relationship model of an Election
Java String Limitations
Free Alternative Of Ms Sharepont Server
how do I create a web page that will accept a parameter that is supplied as part of the web address?
Thecus RAID storage device - disk warnings!!
Serial Port DLL C++
ISA Server PPTP Site-To-Site Link Not Working
Using hyperlink control within a sqldatasource datalist control to pass a querystring value coming from the sqldatasource