#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default DOS Command

I know this is not the ideal place to post, but I need to know what is the
exact proper format to copy a file from one drive to another drive when the
folder name contains a space in it.
Example:
I created a file called "Autocopy.bat"
The command line goes as follows:
xcopy c:\Folder\main.xls d:\Main Files\

The problem I'm having is the space between "Main Files" is not recognized
by DOS. How can I format this so the main.xls copy is made to D:\Main Files
???
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 105
Default DOS Command

Give a try to d:\"Main Files"\
Daniel

I know this is not the ideal place to post, but I need to know what is the
exact proper format to copy a file from one drive to another drive when the
folder name contains a space in it.
Example:
I created a file called "Autocopy.bat"
The command line goes as follows:
xcopy c:\Folder\main.xls d:\Main Files\

The problem I'm having is the space between "Main Files" is not recognized
by DOS. How can I format this so the main.xls copy is made to D:\Main Files
???



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default DOS Command

Untested:

xcopy "c:\Folder\main.xls" "d:\Main Files\"

Why use XCopy when you're copying a single file.

And if you're doing this in a macro, you may want to look at VBAs FileCopy
command.

Troy 2006 wrote:

I know this is not the ideal place to post, but I need to know what is the
exact proper format to copy a file from one drive to another drive when the
folder name contains a space in it.
Example:
I created a file called "Autocopy.bat"
The command line goes as follows:
xcopy c:\Folder\main.xls d:\Main Files\

The problem I'm having is the space between "Main Files" is not recognized
by DOS. How can I format this so the main.xls copy is made to D:\Main Files
???


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default DOS Command

Thank You!!!
You guys are so awesome!

"Dave Peterson" wrote:

Untested:

xcopy "c:\Folder\main.xls" "d:\Main Files\"

Why use XCopy when you're copying a single file.

And if you're doing this in a macro, you may want to look at VBAs FileCopy
command.

Troy 2006 wrote:

I know this is not the ideal place to post, but I need to know what is the
exact proper format to copy a file from one drive to another drive when the
folder name contains a space in it.
Example:
I created a file called "Autocopy.bat"
The command line goes as follows:
xcopy c:\Folder\main.xls d:\Main Files\

The problem I'm having is the space between "Main Files" is not recognized
by DOS. How can I format this so the main.xls copy is made to D:\Main Files
???


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the IF Command Eugene Excel Worksheet Functions 2 August 26th 08 01:25 PM
Need help with IF command Tobias Excel Worksheet Functions 3 March 25th 08 12:19 PM
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
What command to use? Swyne Excel Worksheet Functions 5 November 27th 06 02:29 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"