Search found 2 matches

by xterm11
10 Jul 2009 11:40
Forum: DOS Batch Forum
Topic: Copy
Replies: 3
Views: 5607

avery_larry wrote:Do you want it copied into every subfolder?


Code: Select all

cd /d "%~dp0"
for /d %%a in (*) do copy example.txt "%%a"


THANK YOU! Just what I needed. Could you explain it to me?
by xterm11
26 May 2009 00:23
Forum: DOS Batch Forum
Topic: Copy
Replies: 3
Views: 5607

Copy

How can I copy a file into a subfolder, if I don't know the name of the subfolder? Whenever I use * it says I'm copying over the file, and it doesn't like the syntax of *\*.

Code: Select all

@echo off
Copy example.txt "%~dp0*\*"
pause


Something like that.