April 24, 200521 yr Hi allI have come up against an unexpected problem, I have got a batch file that executes in DOS Mode to copy a file on my D drive to the Start menu\Programs\Startup directory. but it does not work, and I get an error "Bad filename or command". Here is part of my code:copy D:\Batfil~1\defrag.bat C:\WINDOWS\STARTM~1\Programs\StartUp\defrag.batIs there a way to make msconfig start it instead? or am I overlooking something really obvious?Can someone please help me? Thank you!
April 24, 200521 yr Have a look here:http://www.ss64.com/nt/copy.htmlAs a general rule, unless you do need to change the name of the file, the destination path is sufficient:copy D:\Batfil~1\defrag.bat C:\WINDOWS\STARTM~1\Programs\StartUptry this:CD C:\WINDOWS\STARTM~1\Programs\StartUpcopy D:\Batfil~1\defrag.batThe first line changes directory to the destination.The second one copies to the current dir the file.It could be some problem with the 8.3 naming, the above should help in troubleshooting.jaclaz
April 25, 200521 yr Author Thanks, I got it fixed by having it change directory to the file location and then just put in the filename without location.Thanks for your help.
Create an account or sign in to comment