Ibm support community

I keep getting this error whenever I run a .cmd file with robocopy. I have already tried suggestions from this thread & it"s still not working. Any help is much appreciated.

Bạn đang xem: Ibm support community


Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each & 30.0 MiB total.



There are 3 possible issues.

The file does not exist.

C:windowssystem32 is not in the system path variable.

Something within the .cmd file is changing the path variable.

Does C:windowssystem32 obocopy.exe exist?

Does your cmd file exedễ thương C:windowssystem32 obocopy.exe cộ or does it just Hotline robocopy? If the latter, change the statement lớn include the full path khổng lồ the tệp tin.

Xem thêm: Dãy Hoạt Động Hoá Học Của Kim Loại Đứng Trước Hidro, Dãy Hoạt Động Hóa Học Kim Loại

Does the error only occur when you run that cmd file? If you just open a comm& prompt window và type in robocopy, does the program execute? Does anything in the cmd tệp tin reference %path%?

If you open a commvà prompt window và run this commvà, what does it show?

where robocopy .


Comment
Comment Show 0 · Share
Comment
10 |1000 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible lớn all users

Attachments: Up khổng lồ 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.



Clichồng khổng lồ vote 0 Votes" 0 Click khổng lồ down vote
XiaoweiHe-MSFT answered · Mar 01 at 07:18 AM

Hi,

Please check if the robocopy.exe exists và is well in Windows, please find the robocoy.exe pháo in the tệp tin explorer.

And then, please ensure you direct to lớn the right file location that stores the robocopy.exe cộ.

Thanks for your time!Best Regards,Anne

If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation lớn enable e-mail notifications if you want to lớn receive sầu the related tin nhắn notification for this thread.


Comment
Comment Show 0 · Share
Comment
10 |1000 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible lớn all users

Attachments: Up to lớn 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


*

Click to lớn vote 0 Votes" 0 Cliông xã lớn down vote
CharlieLor-4693 answered · Mar 01 at 02:07 PM

Noticed in the screen shot below, if I use the robocopy at the prompt it works. There is no error. However, when I run the .cmd file that contains the exact robocopy line, it errors out.

Xem thêm: Vì Sao Người Ta Chỉ Giữ Lại Làm Giống Các Hạt To Chắc Mày Không Bị Sứt Sẹo Và Không Bị Sâu Bệnh

*


image.png (25.9 KiB)
Comment
Comment · Show 2 · Share
Comment
10 |1000 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible to lớn all users

Attachments: Up khổng lồ 10 attachments (including images) can be used with a maximum of 3.0 MiB each & 30.0 MiB total.


MotoX80 · Mar 01 at 02:41 PM

Did you happen to notice those first few strange characters before the word robocopy? Those are the encoding definitions.

mở cửa the file with notepad & save sầu it with ANSI encoding.

*


1 Vote 1 ·
capture.jpg (22.0 KiB)
*
CharlieLor-4693 MotoX80 · Mar 01 at 02:44 PM

Interesting. I did noticed those strange characters but didn"t pay much attention to it. That might explain why my .cmd file didn"t work. However, I"ve sầu switched to lớn .bat and it works now but will definitely kiểm tra that next time. Many thanks for the help!


0 Votes 0 ·
*

Cliông xã khổng lồ vote 0 Votes" 0 Cliông chồng to lớn down vote
CharlieLor-4693 answered · Mar 01 at 02:14 PM

Okay, I got it working. It seems that I can"t use .cmd as the file extension. I have sầu to lớn use .bat as the extension.


Comment
Comment · Show 1 · Share
Comment
10 |1000 characters needed characters left characters exceeded
▼ Toggle Comment visibility. Current Visibility: Visible khổng lồ all users

Attachments: Up lớn 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


XiaoweiHe-MSFT · Mar 02 at 03:23 AM

Hi,

Glad to lớn hear it works và thanks for your sharing. Then you may accept the useful reply as answer to lớn kết thúc this thread. Thanks for your cooperation!

Best Regards,Anne


0 Votes 0 ·

question details


3 people are following this question.


*
*

Answers Subscribe lớn Answers Answers and Comments Subscribe to Comments and Answers

Related Questions


Issue of Input method


Chuyên mục: Giáo Dục