To stop those characters doing formatting, add the "\" as a prefix to the special characters.
Here's a couple of lines of PowerShell script that will copy all of the ".jpg" files in the f:\ folder and all subfolders to the D:\target1 and D:\target2 folders:
dir f:\ -recurse -include *.jpg | foreach { copy $_.fullname d:\target1 }
dir f:\ -recurse -include *.jpg | foreach { copy $_.fullname d:\target2 }
Note that this forum removes some of the characters from the display for formatting. To see the original statements hit the "quote" link at the bottom and look at them in the editing window.
bmb,
To do something similar to the above as a batch file (and telling you how to build a watch in response to him asking what the time is), you'd do something along the lines of the following:
NOTE THAT IF YOU DON'T KNOW WHAT YOU ARE DOING, THEN THE FOLLOWING CAN CAUSE PROBLEMS - SO UNDERSTAND WHAT IT DOES BEFORE YOU BLINDLY FOLLOW THESE DIRECTIONS
- Right click on the desktop select and then to create a new text document on the desktop
- Right click on the document and select to edit the document
- In the document add the following 2 lines (adjusting the directories and switches as appropriate):
xcopy f:\*.* d:\target1 /S
xcopy f:\*.* d:\target2 /S
(Here, I have assumed the same directories as per Sean's examples - you shoul ensure that the selected target directories exist.)
(To understand what the different switches do, and to select the ones to best meet your needs, you can jump to the command shell {Start > Run > "cmd") and type "xcopy /?"; type "exit" to exit the command shell.)
- Save the text file and exit the editor
- Rigtht click on the file and say to rename it to an appropriate name (eg Copy2x.bat NOTE here that the .bat is the most important part - it should replace thye .txt. )
Now, any time you want to copy your source files to these defined desitinations, you just have to double click this batch fil.e on your desktop.
(
And just to reiterate my warning - make sure you understand what this does before you do it. )
Iain.
--
The more I know, the more I know I don't know ...