1.

Solve : MOVE command with network drives?

Answer»

Hi, I am trying to create a batch file that will move files/documents from multiple locations on a shared network drive into one directory (EITHER local or networked).

I tried using the move command, but it doesn't seem to work when I am using mapped network drives.

Is there a way that I can set this up so I have a series of command lines moving individual files from those various network DIRECTORIES into one directory?

Thanks,
PatrickIf you have full rights to those network directories the move command should work with no problems. However, if you only have read rights the move command would FAIL, but you should be able to use the copy command.

If you do have full rights, mind posting the command you're using to copy the files and have you tried moving the files outside of a batch file?Yes, I do have full rights to those directories. I tried running the command outside of the batch file and I keep getting the message: "The System Cannot find the file specified".

Here is the command line I am using:

move \\Ykgnwt\GNWT Share\Records Management\ARCS TEMPLATE\Information Systems\6003 - Information Services - General\6003-01 - General - 2_0_D\I P 2003 to 2006 (Draft).doc C:\

move \\Ykgnwt\GNWT Share\Records Management\ARCS TEMPLATE\Information Systems\6003 - Information Services - General\6003-01 - General - 2_0_D\test doc.doc G:\TESTING (directory does exist)

I'm thinking I am not entering the UNC correctly. Am I able to execute the move command by not being in the same directory that the file in question is?

Thanks a lot,
PatrickIt looks like you have SPACES, long file names, uncommon characters, etc. I'd first SUGGEST you surround your network path with quotes, for example:

move "\\Ykgnwt\GNWT Share\Records Management\ARCS TEMPLATE\Information Systems\6003 - Information Services - General\6003-01 - General - 2_0_D\I P 2003 to 2006 (Draft).doc" C:\

Give that a shot. In all honesty I've never used the move command over a network so I'll have to try and play around with that myself. However, if all else fails you could use the net use command and map the drive and then move the files from the mapped drive to your location.

For example,

net use f: \\hope\inc

Above command would map path to F:

From there you could copy the files from F: to C:
Hi! Not sure if this wil be too useful but try giving this a go -

Open notepad

Type in the following -

xcopy "(insert the directory of your shared drive)\*.*" (Insert the drive you want the stuff copyed to) /s

so for example it could look like -

xcopy "C:\Documents and Settings\J\Shared\*.*" D:\Copyed /s

Then save the file as 'whatever you wanna call it' .bat

Hope that helps instead of the move command, you probably already know this but the infos there if you need it Worked like a charm once I put the quotes around the network path.

Thanks a lot for your help.

PatrickYou're welcome and thank you for the follow up.



Discussion

No Comment Found