Jump to content


jamios99

Calling a Batch file using "%~dp0

Recommended Posts

Hello,

 

I read up that you need to use the "%~dp0 to specify your working directory to call a Batch file, but having some issues.

All I want to do is simply a background off the DP and place it a in a folder called Data IT on the C drive. The name of the background is called Servier-Sept-2013.jpg

Here is my information

 

 

Command Line : cmd.exe /c copy_wallpaper.cmd

Path of my Batch file : D:\SMSPKGD$\CA100026

Name of Batch file : Copy_wallpaper.cmd

 

md C:\DataIT

xcopy "%~dp0Servier-Sept-2013.jpg" "C:\DataIT"

 

It fails with an error message of 1. Only thing that comes to mind is that we have a GPO that creates the Data IT folder already

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.