I have often to deal with the following routine in batch scripts I make: I have several files in a folder together with my script. When script runs it checks if those files exist in the previous folder of the path and if not it copies them there. Until now I am doing this using the command:
IF EXIST file1 (GOTO con1) ELSE (GOTO 1)
copy file1 .\..
and so on for file2, file3, etc.
Is there a way to save my time creating a shorter script that will do the job?
Btw I use parameters like .\., .\.., etc. I know so far only those with a range a couple of folders before or after the working folder in path. Are there more with a wider range (more folder/levels in path)? Where can I find more infos about this subject?
Making the same question in other words, if I have a script in C:/a/b/c/d/e/f/g/h/i/j/ folder and I want to do something in b folder I have to write the path. But what if this script will run in another computer where path /a/b/c/d/e/f/g/h/i/j/ is placed in another hard disk and not in C?
Thanks in advance.