Computing.Net > Forums > Programming > Copy files from cd with .bat file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Copy files from cd with .bat file

Reply to Message Icon

Name: DamianCrow
Date: January 9, 2008 at 06:01:32 Pacific
OS: XP
CPU/Ram: 1g
Product: Acer
Comment:

I need to get a .bat file to copy fonts from a cd to the "C:\windows\fonts" folder on my client's PC. I do not know the config of their computer but i do know that XP is the common operating system. and ideas?



Sponsored Link
Ads by Google

Response Number 1
Name: User123456789
Date: January 9, 2008 at 07:54:30 Pacific
Reply:

copy X:\fonts\*.ttf C:\windows\fonts

I'm just having a guess at the directories here. The source (the CD drive itself) can be anything ranging from D: till Z: ...

But you know the file on the source CD, example : D:\fonts\font0001.ttf

You can do :

if exist D:\fonts\font0001.ttf copy D:\fonts\*.ttf C:\windows\fonts

if exist E:\fonts\font0001.ttf copy E:\fonts\*.ttf C:\windows\fonts

if exist F:\fonts\font0001.ttf copy F:\fonts\*.ttf C:\windows\fonts

...

Hi there.


0

Response Number 2
Name: DamianCrow
Date: January 9, 2008 at 16:09:26 Pacific
Reply:

yeah but it says "error : access denied" when doing those, and it copies nothing.... :(


0

Response Number 3
Name: Razor2.3
Date: January 9, 2008 at 19:24:38 Pacific
Reply:

Leave the script in the root of the CD. That way, the current directory will be the CD root.

copy fonts\*.ttf %SystemRoot%\fonts

If you're still getting access denied errors, your client doesn't have the ability to add files to %SystemRoot%\fonts.


0

Response Number 4
Name: User123456789
Date: January 10, 2008 at 05:40:04 Pacific
Reply:

That's indeed a better idea ... But if either you want to have this script run on startup of computer (with or without the CD actually in the drive), or if you want the script to do something else and/or display any kind of additional information, you'll need to have the file off the CD.

Hi there.


0

Response Number 5
Name: DamianCrow
Date: January 10, 2008 at 14:53:14 Pacific
Reply:

i used "copy fonts\*.ttf %SystemRoot%\fonts" like indicated above, and got an "access denied" error message 4,200 times (once for each of the fonts to be copied)....i did this from my system (vista ultimate) and I am signed in as the administrator. here is my entire code:


@echo off
echo -------------------
echo Script by Damian Crow
echo -------------------
echo This Program will install 4,200 new fonts to your PC.
Pause.
copy fonts\*.ttf %SystemRoot%\fonts
echo font install Complete!
Pause.



0

Related Posts

See More



Response Number 6
Name: Razor2.3
Date: January 10, 2008 at 22:20:26 Pacific
Reply:

Is UAC in effect?


0

Response Number 7
Name: DamianCrow
Date: January 12, 2008 at 04:17:42 Pacific
Reply:

what is UAC?


0

Response Number 8
Name: Razor2.3
Date: January 12, 2008 at 06:54:29 Pacific
Reply:

User Access Control, aka Vista's, "You only THINK you're an administrator, but we've only given you the power of a regular (limited) user."


0

Response Number 9
Name: DamianCrow
Date: January 13, 2008 at 05:29:18 Pacific
Reply:

yes UAC is on then. I get pop ups asking to verify and confirm. and after the initial install the first time i use a program I must right click the icon nd go to "run as administrator" ....


0

Response Number 10
Name: Razor2.3
Date: January 14, 2008 at 18:24:55 Pacific
Reply:

Well, I don't know of any way to script your way up to Admin w/ UAC in effect. I think runas might do it, but it'll ask for a password, and the user WILL have to input it.


0
Reply to Message Icon

Waht is wrong? It won't ... WSH console functions



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Copy files from cd with .bat file

I need help with bat file - please help www.computing.net/answers/programming/i-need-help-with-bat-file-please-help/2971.html

Need help with bat file www.computing.net/answers/programming/need-help-with-bat-file/13270.html

Help with bat file www.computing.net/answers/programming/help-with-bat-file/12224.html