Link to home
Start Free TrialLog in
Avatar of bluerodeo68
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?
Avatar of Munnday
Munnday
Flag of United Kingdom of Great Britain and Northern Ireland image

Please post the contents of the bat file
Avatar of bluerodeo68
bluerodeo68

ASKER

echo *****OUTPUT FOR M0GLBL01 MATL import txt files***** %DATE% %TIME% >> c:\m0glbl01_scheduled_tasks\M0GLBL01_IMLOG.TXT

move D:\m0glbl01\GlobalConfig\FTP\AP\MATL*.txt D:\m0glbl01\GlobalConfig\FTP\backup >> c:\m0glbl01_scheduled_tasks\M0GLBL01_IMLOG.TXT
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.
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
Avatar of Munnday
Munnday
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The system cannot find the path specified "error reported when I run from CMD prompt.
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
It was an improper path, I can't believe I missed something so simple.  Thanks for the tip to use CMD prompt for diagnosis.