Sinisterly
About copying file - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Coding (https://sinister.ly/Forum-Coding--71)
+--- Thread: About copying file (/Thread-About-copying-file)



About copying file - pijero1stjudnt - 04-08-2014

I want to copy all .txt files from "C:\" to "D:\" for example (include copying files from "Documents and Settings", "WINDOWS", etc). How can I do that?


RE: About copying file - chmod - 04-08-2014

This is fairly simple to do and could have been answered straight away with a simple google search:
Code:
for /r %x in (*.txt) do copy "%x" D:\targetDir\ /Y



RE: About copying file - pijero1stjudnt - 04-09-2014

(04-08-2014, 03:58 PM)chmod Wrote: This is fairly simple to do and could have been answered straight away with a simple google search:
Code:
for /r %x in (*.txt) do copy "%x" D:\targetDir\ /Y

Tks for your reply. I've tried this code but nothing happen Sad. And I want to know where is "C:\...\" in the code


RE: About copying file - pijero1stjudnt - 04-09-2014

I've found this code
Code:
xcopy "c:\folder a\folder b\my folder\*.*" "c:\*.*" /s /e /c
which is what I'm looking for. This topic can be closed now


RE: About copying file - Inori - 04-11-2014

I think you can do something like
Code:
copy C:\*\*.txt D:\
90% sure this would work but @chmod's looks more legit


RE: About copying file - pijero1stjudnt - 04-12-2014

(04-11-2014, 09:40 PM)w0lf Wrote: I think you can do something like
Code:
copy C:\*\*.txt D:\
90% sure this would work but @chmod's looks more legit
I've tried it and it didn't work. I think you can't write "\*\" as all folders


RE: About copying file - Inori - 04-15-2014

(04-12-2014, 01:16 AM)pijero1stjudnt Wrote:
(04-11-2014, 09:40 PM)w0lf Wrote: I think you can do something like
Code:
copy C:\*\*.txt D:\
90% sure this would work but @chmod's looks more legit
I've tried it and it didn't work. I think you can't write "\*\" as all folders
scratch what I said before, I think all you need to do for C:\ is C:\*.txt