Skip to content

Calling a Batch file using "%~dp0

Featured Replies

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

 

 

 

 

 

 

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.