Re: Create .DOC files from .DOT files automatically
- From: "Linda Aldrich" <linda.aldrich@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Apr 2008 11:21:50 -0700
The files are always the same. No, I don't want them overwritten. The
end-user will be updating the .doc files in the new folder. Yes, I'd like
the program to exit if the files already exist in the target folder.
Thanks again for all of your help!
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:%23C4Aj0EoIHA.548@xxxxxxxxxxxxxxxxxxxxxxx
It depends:
- Are they always the same files or do they change?
- Do you want them to be overwritten?
- Do you want the program to exit?
"Linda Aldrich" <linda.aldrich@xxxxxxxxxxxxxxxxxxx> wrote in message
news:%23IgwJGCoIHA.3892@xxxxxxxxxxxxxxxxxxxxxxx
Great! Thank you! It works well, except for...
If the user folder already exists, it still copies the .dot files over
and than gives an error message that the .doc files already exist. Which
leaves us with a copy of the .dot and .doc docs in the target folder.
should I just add the line
del "%target%\%dir%\*.dot"
after the 'rename' line?
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:OeZXWpBoIHA.2632@xxxxxxxxxxxxxxxxxxxxxxx
Of course batch files still work - they work better than ever!
Try this:
@echo off
set source=d:\Templates
set target=d:\User Files
echo.
set /p dir=Please enter the target directory, e.g. Finance
if "%dir%"=="" goto exit
if not exist "%target%\%dir%" md "%target%\%dir%"
copy /y "%source%\*.dot" "%target%\%dir%"
ren "%target%\%dir%\*.dot" *.doc
:Exit
echo.
echo Press the Space Bar to close this window.
pause > nul
"Linda Aldrich" <linda.aldrich@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uYfi8HBoIHA.264@xxxxxxxxxxxxxxxxxxxxxxx
That worked when I tested it (including opening the renamed document).
Thanks! Do batch files still work from a command prompt or in Explorer
in Windows XP? If so, is there a way to prompt the user to make a
directory in a certain folder structure and than change directories to
the newly created directory before copying the files over?
"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:edt2U7AoIHA.4620@xxxxxxxxxxxxxxxxxxxxxxx
"Linda Aldrich" <linda.aldrich@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uaRHwyAoIHA.3652@xxxxxxxxxxxxxxxxxxxxxxx
We are looking for a way to automatically create .doc files from .dot
files and place them in a new directory in one step. Can anyone
help?
Thanks!
Linda Aldrich
Assuming that .doc files have the same format as .dot files
(which the experts in a Word newsgroup would be able to
comment on), all you need to do is to run these commands
from a Command Prompt:
copy "d:\Templates\*.dot" "d:\My Documents"
ren "d:\My Documents\*.dot" *.doc
.
- Follow-Ups:
- Re: Create .DOC files from .DOT files automatically
- From: Pegasus \(MVP\)
- Re: Create .DOC files from .DOT files automatically
- References:
- Create .DOC files from .DOT files automatically
- From: Linda Aldrich
- Re: Create .DOC files from .DOT files automatically
- From: Pegasus \(MVP\)
- Re: Create .DOC files from .DOT files automatically
- From: Linda Aldrich
- Re: Create .DOC files from .DOT files automatically
- From: Pegasus \(MVP\)
- Re: Create .DOC files from .DOT files automatically
- From: Linda Aldrich
- Re: Create .DOC files from .DOT files automatically
- From: Pegasus \(MVP\)
- Create .DOC files from .DOT files automatically
- Prev by Date: permission/security issues
- Next by Date: Re: Create .DOC files from .DOT files automatically
- Previous by thread: Re: Create .DOC files from .DOT files automatically
- Next by thread: Re: Create .DOC files from .DOT files automatically
- Index(es):
Relevant Pages
|