bluerodeo68
asked on
Move Files in a .bat file not working but did earlier in the day on windows server 2003
Okay I created a simple .bat file to move files with MATL*.txt and REFUND*.txt from one directory on the D: drive to another directory. It was working earlier but now it's not working. Do I need to set an environment path variable to include the D: drive?
Please post the contents of the bat file
ASKER
echo *****OUTPUT FOR M0GLBL01 MATL import txt files***** %DATE% %TIME% >> c:\m0glbl01_scheduled_task s\M0GLBL01 _IMLOG.TXT
move D:\m0glbl01\GlobalConfig\F TP\AP\MATL *.txt D:\m0glbl01\GlobalConfig\F TP\backup >> c:\m0glbl01_scheduled_task s\M0GLBL01 _IMLOG.TXT
move D:\m0glbl01\GlobalConfig\F
ASKER
Originally the log file was not created but I had users clicking on the .bat file and it did move the files to the backup folder.
So I shortened the name of the log file and now that's working but the files are not moving when I click on the .bat file.
So I shortened the name of the log file and now that's working but the files are not moving when I click on the .bat file.
ASKER
I was reading be sure that Notepad is saving as "All files" and not as a text file. Is this important and would it give me inconsistent results?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The system cannot find the path specified "error reported when I run from CMD prompt.
ASKER
The log file part of the .bat is working. Sending the time and date of when the .bat is executed; but the move is failing
ASKER
It was an improper path, I can't believe I missed something so simple. Thanks for the tip to use CMD prompt for diagnosis.