?
Solved

Simple script problem

Posted on 2006-11-11
3
Medium Priority
?
133 Views
Last Modified: 2010-04-13
I am trying to run the following script via a batch file and when I run it, it tells me that the syntax is wrong. Can someone tell me where it is wrong???

copy \\server1\world\phones.url  \%userprofile%\application data\microsoft\internet explorer\quick launch

Thanks.
0
Comment
Question by:ainselyb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Expert Comment

by:oBdA
ID: 17921411
Two errors: %userprofile% (as well "Internet Explorer" and "Quick Launch") contains spaces, so the path has to be enclosed in quotes, and you can't start the path with a backslash:
copy "\\server1\world\phones.url"  "%userprofile%\application data\microsoft\internet explorer\quick launch"
0
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 17921423
Sorry, missed a third error (not related to your error message, though).
You're basically correct using %Userprofile% (instead of "C:\documents and settings\%username%", as way too many people do) when trying to access a user's profile; but when it comes to the application data, you should use another variable, "%AppData%":
copy "\\server1\world\phones.url"  "%appdata%\microsoft\internet explorer\quick launch"
0
 

Author Comment

by:ainselyb
ID: 17921493
Thanks you so very much! This was dead on - I so rarely get a 'dead on' answer - I very much appreciate it.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question