Batch script doesn't work

Testing for location on USB drive but doesn't work

Page 1 of 1

1 Replies - 1260 Views - Last Post: 09 November 2010 - 01:12 PM Rate Topic: -----

#1 deemeetar  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 66
  • Joined: 22-January 10

Batch script doesn't work

Posted 09 November 2010 - 12:07 PM

Hello, i tried to make a simple backup batch script but it won't work:
@echo off
cd "D:\Plakjanje Fakturi"
IF EXIST F:\plakjanje fakturi\negativna (
copy fakturi.db "F:\plakjanje fakturi\negativna"
echo. negativna copied.
pause
)


Now F: should be the USB drive, and i want to test if it is inserted, and if there is a directory named like this.
I tried to put it in "" but still doesn't work.

This post has been edited by deemeetar: 09 November 2010 - 12:11 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Batch script doesn't work

#2 Gorian  Icon User is offline

  • ninja DIC
  • member icon


Reputation: 153
  • View blog
  • Posts: 1,853
  • Joined: 28-June 08

Re: Batch script doesn't work

Posted 09 November 2010 - 01:12 PM

when changing root drives, try

D:
cd "Plakjanje Fakturi"



I wrote a batch file for something similiar, to set a variable for the root drive of a USB Key.

snippet

This post has been edited by Gorian: 09 November 2010 - 01:15 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1