I have a file in folderone/sub1 called Hello.txt
Now lets say I want a script to delete that file out, and the same script will also copy another file in in, if its not there.
So I can do
IF EXIST folderone/sub1/Hello.txt GOTO :!
:1 del folderone/sub1/hello.txt
exit
But now what do I do, thats the part that gets rid of it. Now how do I make it check if its there, and then copy the other file in?
(The other file is the same file but its in another location, its there to be copied in)
HELP Simple IF File Moving!!!
Moderator: DosItHelp
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: HELP Simple IF File Moving!!!
SO --
I'm not clear on when you want to copy the other file . . ?
IF hello.txt exists, then delete it and do nothing else? Or delete it and then copy the other file?
IF hello.txt does not exist, then copy the other file?
I'm not clear on when you want to copy the other file . . ?
IF hello.txt exists, then delete it and do nothing else? Or delete it and then copy the other file?
IF hello.txt does not exist, then copy the other file?