?
Solved

Move Files in a .bat file not working but did earlier in the day on windows server 2003

Posted on 2009-12-17
8
Medium Priority
?
241 Views
Last Modified: 2012-05-08
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?
0
Comment
Question by:bluerodeo68
  • 6
  • 2
8 Comments
 
LVL 3

Expert Comment

by:Munnday
ID: 26077029
Please post the contents of the bat file
0
 

Author Comment

by:bluerodeo68
ID: 26077077
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
0
 

Author Comment

by:bluerodeo68
ID: 26077087
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.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:bluerodeo68
ID: 26077113
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?
0
 
LVL 3

Accepted Solution

by:
Munnday earned 2000 total points
ID: 26077117
Try opening up command prompt (Start -> Run -> type 'cmd' -> hit ok) and type in the full path to the .bat file (eg. c:\test\test.bat)

This will execute the batch file, but keep the command window open so you should be able to see what errors it reports.
0
 

Author Comment

by:bluerodeo68
ID: 26077201
The system cannot find the path specified "error reported when I run from CMD prompt.
0
 

Author Comment

by:bluerodeo68
ID: 26077209
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
0
 

Author Closing Comment

by:bluerodeo68
ID: 31667618
It was an improper path, I can't believe I missed something so simple.  Thanks for the tip to use CMD prompt for diagnosis.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question