Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > Script help
  Last Thread   Next Thread
Share
Author
Thread    Post A Reply
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'
Script help

Unfortunately my knowledge on writing scripts is very basic so I'm wondering if someone can help me.

I've written a simple script that people can run to retreive the latest version of a file from the server which then goes on to copy it to their local workstation. Now what I've done works just fine but, a requirement for it to work is for them to already have the final destination folder created on their workstation.

What I've done so far:

echo off
cls
echo You are about to update your copy of test.accdb
echo
pause
copy s:\test\test.accdb c:\progra~1\test\test.accdb /Y
echo
echo Update installed.
echo
pause


What I want to add to the above is a way for the script to check if the folder exists. If it does, then I want it to go ahead with deploying the new version of the file as normal. If it doesn't, then I want the script to create the destination folder and then continue to copy in the new file.

Is this possible? And can anyone tell me what I need to do?

Cheers.

Old Post Feb-10-2009 15:15 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
whiskers
old skool



Registered: Sep 2001
Location: in your dreams

quick google search (i'm not proficient in batch programming):
check if directory exists: IF EXIST c:\windows\nul ECHO Directory exists!


create directory: md c:\newdir


I don't know how to do a "not" in batch programming, but if you say

IF [NOT] EXIST C:/yourdir md C:/yourdir


something like that.


___________________

Old Post Feb-10-2009 15:25  Ukraine
Click Here to See the Profile for whiskers Click here to Send whiskers a Private Message Add whiskers to your buddy list Report this Post Reply w/Quote Edit/Delete Message
KiNeTiC ENeRgY
t3cHn0_43ad



Registered: Oct 2003
Location: Boca Raton

why don't u ask software code issues on a trance music site?

Old Post Feb-10-2009 15:28  United States
Click Here to See the Profile for KiNeTiC ENeRgY Click here to Send KiNeTiC ENeRgY a Private Message Add KiNeTiC ENeRgY to your buddy list Report this Post Reply w/Quote Edit/Delete Message
whiskers
old skool



Registered: Sep 2001
Location: in your dreams

quote:
Originally posted by KiNeTiC ENeRgY
why don't u ask software code issues on a trance music site?


You must not have been paying attention. People who listen to EDM have higher IQs than the rest of the music lovers. People with higher IQs are good with computers. QED. You must be a lover of hip-hop.


___________________

Old Post Feb-10-2009 15:33  Ukraine
Click Here to See the Profile for whiskers Click here to Send whiskers a Private Message Add whiskers to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

I'll look into it whiskers, cheers.

quote:
Originally posted by KiNeTiC ENeRgY
why don't u ask software code issues on a trance music site?


Because there are quite a few users on here who, unlike yourself, aren't fucking useless little cunts and actually know their shit with this sort of thing. I've asked a handful of questions like this one in the past and have always gotten the answer I wanted.

Old Post Feb-10-2009 15:36 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
KiNeTiC ENeRgY
t3cHn0_43ad



Registered: Oct 2003
Location: Boca Raton

quote:
Originally posted by whiskers
You must not have been paying attention. People who listen to EDM have higher IQs than the rest of the music lovers. People with higher IQs are good with computers. QED. You must be a hip-hop lover.


false. Your logic skills suck. High IQ does not equal knowing code without prior knowledge, or anything else for that matter. I might seek out this information from a software coder site. A simple google search would get his answer.

Old Post Feb-10-2009 15:36  United States
Click Here to See the Profile for KiNeTiC ENeRgY Click here to Send KiNeTiC ENeRgY a Private Message Add KiNeTiC ENeRgY to your buddy list Report this Post Reply w/Quote Edit/Delete Message
KiNeTiC ENeRgY
t3cHn0_43ad



Registered: Oct 2003
Location: Boca Raton

quote:
Originally posted by DJ Mikey Mike
I'll look into it whiskers, cheers.



Because there are quite a few users on here who, unlike yourself, aren't fucking useless little cunts and actually know their shit with this sort of thing. I've asked a handful of questions like this one in the past and have always gotten the answer I wanted.


Funny cause I know the answer, but since u are such a ****, I won't tell u.

Old Post Feb-10-2009 15:37  United States
Click Here to See the Profile for KiNeTiC ENeRgY Click here to Send KiNeTiC ENeRgY a Private Message Add KiNeTiC ENeRgY to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

Whatever you sad fuck I'm finishing work now. I know I'll have my answer by tomorrow, whether it be on here or on one of the other boards I've posted on. I always do.

Old Post Feb-10-2009 15:42 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
basd
progression



Registered: Jul 2002
Location: Somewhere nowhere

quote:
Originally posted by whiskers
quick google search (i'm not proficient in batch programming):
check if directory exists: IF EXIST c:\windows\nul ECHO Directory exists!


create directory: md c:\newdir


I don't know how to do a "not" in batch programming, but if you say

IF [NOT] EXIST C:/yourdir md C:/yourdir


something like that.

You're right.

Mike, just add the following statement to your batch file:

IF NOT EXIST [full dir path]\nul MD [full dir path]

The '\nul' part right behind the path is the DOS (Unix?) workaround for the EXIST command to check for folders to exist, since the EXIST command on itself works on files only. '\nul' is a file which will exist in all DOS directories by default, so to say.


___________________

d&b session 20090519
My take on... (various mixes planned, updated when I can be arsed)

Old Post Feb-11-2009 06:05  Netherlands
Click Here to See the Profile for basd Click here to Send basd a Private Message Add basd to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Fledz
Banned



Registered: Sep 2006
Location: London UK

quote:
Originally posted by KiNeTiC ENeRgY
why don't u ask software code issues on a trance music site?

There's 87K users here. Chances are there are people that know.

If you're going to be a troll, at least be a good and entertaining one.


___________________
Like Progressive and Deep House? Grab my latest mix below
http://www.tranceaddict.com/forums/...s=#.UAv1rbRo3h4

Old Post Feb-11-2009 06:09  Croatia
Click Here to See the Profile for Fledz Click here to Send Fledz a Private Message Add Fledz to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Joss Weatherby
Banned



Registered: May 2008
Location: The Pacific Northwest, of course

quote:
Originally posted by KiNeTiC ENeRgY
why don't u ask software code issues on a trance music site?


i believe that is what he is doing...

man dos/windows batch scripts are fugly...

Old Post Feb-11-2009 06:54 
Click Here to See the Profile for Joss Weatherby Click here to Send Joss Weatherby a Private Message Visit Joss Weatherby's homepage! Add Joss Weatherby to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

quote:
Originally posted by basd
You're right.

Mike, just add the following statement to your batch file:

IF NOT EXIST [full dir path]\nul MD [full dir path]

The '\nul' part right behind the path is the DOS (Unix?) workaround for the EXIST command to check for folders to exist, since the EXIST command on itself works on files only. '\nul' is a file which will exist in all DOS directories by default, so to say.




Works a treat. Thanks fella.

Old Post Feb-11-2009 09:39 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > Script help
Post New Thread    Post A Reply

 
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackanother from M.I.K.E. set [2004] [1]

Click here to listen to the sample!Pause playbackWavechild feat DJ Ricky - Symphony Of Energy [2002]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 23:18.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!