XP Dos MOVE Command

December 22, 2009 at 14:13:56
Specs: Windows XP
I'm trying to move some folders to a different location. All the folders I need to move use long filenames including a six-digit alpha name + "_files"; i.e. abcdef_files would be one example. I've tried the following, but keep getting errors or "0 files copied" errors. I've tried:

move /y "c:\example\??????_files" c:\destination\

xcopy "c:\example\??????_files" c:\destination\

Any help appreciated.


See More: XP Dos MOVE Command

Report •


#1
December 22, 2009 at 14:16:40
Is there some reason why you can't copy/paste or drag/drop from within windows?

Report •

#2
December 22, 2009 at 14:28:47
I need to automate the proceedure with a batch file, and execute it daily.

Report •

#3
December 22, 2009 at 14:43:31
I see you put in the quotes in order to cater for long file names:
move /y "c:\example\??????_files" c:\destination\

Was the destination also a long file name (as shown)?

In which case use:
move /y "c:\example\??????_files" "c:\destination"

some other bloke...


Report •

Related Solutions

#4
December 22, 2009 at 15:18:35
sorry, bad example. even when adding the quotes to the destination string it does not work.

someone told me that MOVE does not process wildcards on folders... i don't know, but unable to find the solution anywhere.

again, the problem is to move a bunch of folders with names ending in "_files" to another location with an automated batch file. I have also tried to just xcopy to location then del the originals but that not working either... I get "0 Files Copied".


Report •

#5
December 22, 2009 at 16:05:01
The following moved the complete _files folder, whether you pre-created
'c:\Btest destination' folder or not:

md "c:\Btest destination"
move /y "c:\Atest\Atest_files" "c:\Btest destination"

The folder 'Atest_files' contained some long file names, which were preserved.

I never got any error messages. You didn't include any invalid Windows characters by any chance?

some other bloke...


Report •

#6
December 23, 2009 at 11:01:35
Ok... I tried your example and it worked. I had not tried to move a folder on the same drive.

I then tried to move the folder to another drive using the same example: Drive E which is local, and Drive T which is a network drive. In practice, this is what I'm trying to accomplish...

In both cases I get an "Access is Denied" error. Any ideas as to why I can't use the Move Command to move between drives; local or networked?

Thanks again for the help.


Report •

#7
December 23, 2009 at 15:32:57
There might be a more elegant solution but this works for me:

md "e:\Btest destination\Atest_files"
move "c:\Atest\Atest_files\*.*" "e:\Btest destination\Atest_files"

[I'm moving 'Atest_files' contents to a sub-folder with the same
name on my E drive]

Strangely I never seem to run into error messages.

some other bloke...


Report •

#8
December 23, 2009 at 15:50:32
....and here's a way to do it using xcopy instead:

md "e:\Btest destination\Atest_files"
xcopy "c:\Atest\Atest_files" "e:\Btest destination\Atest_files" /s /e

This leaves the original folders & files intact of-course.

You only need the /e at the end of the second line if you wish to copy
empty sub-directories.

some other bloke...


Report •

#9
December 30, 2009 at 11:34:31
Any luck?

some other bloke...


Report •

#10
December 30, 2009 at 17:21:38
XCOPY "C:\FolderName" "X:\NewFolderName" /i

Copies files and directories, including subdirectories to X drive, AND also creates a "NewFolderName" without using the MD command

After this line you can then delete the original FolderName (note: that you should always confirm the data was successfully copied first before deleting the original


Report •

#11
December 30, 2009 at 18:04:07
kimsland

Thanks - I thought there must be a neater way of doing this but hitherto our real DOS experts seemed to have gone missing. Lets hope the poster comes back (or has now sorted it).

some other bloke...


Report •


Ask Question