# Solved: Darn OLE Command Prompt!!



## Ronzola (Mar 5, 2013)

BATCH FILES NOT WORKING !!

I have changed them around and I am beating my head into the ground and getting nowhere. I had success with simple ones that don't go deep into the directories,

My Batch Files code is below. What is wrong here!

xcopy /e /o "C:\Documents and Settings\JimAdministrator\Desktop\Folder2"*.* "C:\MyName\Tchncl\MyComputer\Software\GenTechInfo"

*Output of batch file below*​
C:\Documents and Settings\JimAdministrator\Desktop>xcopy /e /o "C:\Documents and Settings\JimAdministrator\Desktop\Folder2"*.* "C:\MyName\Tchncl\MyComputer\Software\GenTechInfo
0 File(s) copied

Any help is greatly appreciated!


----------



## Squashman (Apr 4, 2003)

```
xcopy /e /o "C:\Documents and Settings\JimAdministrator\Desktop\Folder2\*" "C:\MyName\Tchncl\MyComputer\Software\GenTechInfo"
```


----------



## Ronzola (Mar 5, 2013)

I noticed that you have one * asterisk instead of the typical all file *.* to copy all of the files, I think this is an error, otherwise your code looks the same as mine.

Your code below
xcopy /e /o "C:\Documents and Settings\JimAdministrator\Desktop\Folder2\*" "C:\MyName\Tchncl\MyComputer\Software\GenTechInfo"


----------



## Ronzola (Mar 5, 2013)

I tried your code. Same results. Zero files copied.


----------



## Ronzola (Mar 5, 2013)

SOLVED AND THANKS !

My apology, I forgot to rename something. After doing that I saved it to a text file and then to a .bat file with the same name as the text file. Then ran the Batch Files and it worked.

Thanks!


----------



## Ronzola (Mar 5, 2013)

Seems it only copies the Folder Structure. All the Folders were their but no .txt files or .doc files either. The weirdest thing is that it is copying folders on my desktop and not on the folder on my desktop. >??????

Batch file code below:
"C:\Documents and Settings\AdminName\Desktop\Wayne2\Business*" "C:\Wayne\Tchncl\MyComputer"



I checked my computer and because this batch file said 0 copies, I never thought it did anything, but it wrote the folder structure specified in the command above a few times. I had to delete a few instances of the empty Wayne2 folders and their subdirectories with no files.



Code used last night was just as below. So it seems the code I was using was working but not copying any text files or documents. Not what I want. Now, if I can get it to copy all files such a *.* I'll be in business. I have tried putting the *.* after the quotes that specify directories with spaces.

xcopy /e /o "C:\Documents and Settings\Desktop\AdminName\Desktop\Wayne2*.*" "C:\MyName\Tchncl\MyComputer"


----------



## Squashman (Apr 4, 2003)

Business and Wayne2 are directories. You need a slash after them just like the example I gave you.


----------

