Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

forFiles in DOS 10 different syntax errors


  • Please log in to reply
No replies to this topic

#1 ajetrumpet

ajetrumpet

  •  Avatar image
  • Banned Spammer
  • Member rank image
  • 625 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:03:44 PM

Posted 04 February 2021 - 10:27 PM

can someone tell me what's wrong with this?

@echo off
echo Copying files...
forfiles /p "C:\Users\13195\Desktop\nmb\Employment Documents\docs\.0-CURRENT" /m "*.docx" /s /c ^ 
"cmd /c copy @path C:\Users\13195\Desktop\nmb\d\docs\.0-CURRENT\google_drive"
pause
echo All files have been copied.
exit

i'm getting:

 

invalid syntax.  value expected for '/c'.

 

but according to this, nothing is wrong:

 

https://www.computerhope.com/forfiles.htm



BC AdBot (Login to Remove)

 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users