-2

I am run below cmds in commands prompt
for Ex:

for /f %a in (Y:\el.txt) do move %a C:\Users\srinu\Desktop\test 

after that i need result txt file
Example:c:\skipped.txt (not moved File Numbers) how to create in cmd
how to write in command prompt

6
  • it's the same command, just change %a to %%a in batch file, also you can redirect the output (all of it, not just the skipped ones) to a file using the >> operator so your command becomes for /f %%a in ([SRC]) do move %%a [DIST] >> 'LOG'
    – tbc
    Apr 15, 2015 at 9:30
  • i tryed but not working.
    – srinu u
    Apr 15, 2015 at 9:50
  • 2
    sentences like 'it didn't work' and 'not working' doesn't give the others any information at all, can you please specify what you used (a sample of code) and what the result/error was
    – tbc
    Apr 15, 2015 at 10:11
  • i am getting syntax error
    – srinu u
    Apr 15, 2015 at 10:20
  • @srinuu: What is the command you entered based on what tbc wrote? Did you include [SRC] and [DIST] as-is?
    – Karan
    Apr 15, 2015 at 19:57

1 Answer 1

0

here is the command for cmd:

for /f %a in (Y:\el.txt) do move "%a" "C:\Users\srinu\Desktop\test"

in a batch file:

for /f %%a in (Y:\el.txt) do @move "%%a" "C:\Users\srinu\Desktop\test" >> log.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .