Network File Move using Batch File

Posted on 2007-08-01
Last Modified: 2012-05-05
I have a  computer on my network that dumps files into an alt folder when it has normal path flow issues and cannot reach it's destination.  what I'm trying to do is create a batch file that will allow me to move those alt files to my local computer, rename the files, then move the files to the destination share... in my simple thinking no experience batch file setting up here is what i've been trying to do that doesn't work but will give you an idea of that i'm looking for

move \\machine1\c\altupld\*.* \\machine2\c$\documents and settings\username\desktop\test\
rename \\machine2\c$\documents and settings\username\desktop\test\*.* name.*
move \\machine\c$\documents and settings\username\desktop\test\*.* \\server\folder\folder\folder\folder\

The rename portion of this works fine, it's the moving aspect I'm doing something wrong.  need a little direction here
Question by:txpaulrs
    LVL 30

    Accepted Solution

    Aside from the c reference instead of c$ reference in your first move command, you'll want to double quote the file names since there is a space in them:

    move "\\machine1\c$\altupld\*.*" "\\machine2\c$\documents and settings\username\desktop\test\"

    LVL 4

    Expert Comment

    you could try to use network letters ex:

    net use r: \\machine1\c\altupld
    net use s: \\machine2\c$
    move r:\*.* s:\documents and settings\username\desktop\test\

    or try copy follow with del ...
    LVL 1

    Author Comment

    who knew quotes would make such a big difference, obviously I didn't... thanks for the help SteveGTR also Dalton I recognize your method will work as well... thanks for the input

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
    Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now