Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7798871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:07:29+00:00 2026-06-02T00:07:29+00:00

I have a bat file copying files from current machine to mapped network drive

  • 0

I have a bat file copying files from current machine to mapped network drive (one line, xcopy command).

It works when I RDP to server. However, when I run as a scheduled task, and configure it to run under the same user I’m logged in, it doesn’t work and give error 0x4.

Is there a way I can achieve this?

I also try dsynchronize and it works when I click synchronized. When I run it as service same issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:07:31+00:00Added an answer on June 2, 2026 at 12:07 am

    I was able to figure it out. Following batch files works under scheduler, even as local system account:

    net use m: \\server\share /U:server\user password
    xcopy C:\source m: /E /Y
    

    It maps a network drive every time and then copy to that drive

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a batch file that automates copying a bunch of files from one
I have one bat file on windows7, for backup several tables from my database,
I have the following line in a bat file: xcopy script_temp\* \\CHU-Computer-Science\CHU\scripts\ /S /E
I have bat-file, that make some operations. How to run this file from Delphi
I have a powershell command running when I execute a bat file, The command
I have a simple bat script that copies files from an known directory to
I have a BAT file, which creates a number of csv files by reading
I have this line inside my BAT file: Example1Server.exe I would like to execute
I have a .bat file with certain commands which it executes (XCOPY/DEL/RMDIR,etc) Now what
I have a executable file VSTO.exe & a try.bat file in one folder. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.