Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to copy like this:
copy file.txt \\XXbdc\share\file.txt
where XX must be replaced from a list like this:
AA
AB
AC
etc.Can this be done i a batch-file?
(sorry my bad english!)

G'day,
Not totally sure about this but try using the %1 %2 etc operators.Like, the content of your batch file- filename.bat -would be:
copy file.txt \\%1bcd\share\file.txtCommand line would be filename XX.
You could also replace file.txt with
copy %1.txt \\%2bdc\share\%1.txt.Command line would now be:
filemame file XXJust remember that they are in order ie %1 %2 etc, and that if you use spaces in XX then they become two variables.
Give it a go,
regards,
Peter

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |