Sign In:     


Forum: Old versions

Topic: can any command prompt geniuses help with a batch file

This topic is old and might contain outdated or incorrect information.

What I want to do is create a bat or cmd file to sync 3 folders on two different computers and one usb...

The problem I am having is a) I don't understand command prompt... and b) The usb I will be using changes drive letters on the different computers... and c) one of the places I will be copying from and to is school so the computer is constantly changing as I use the network with a personal folder so I can't simply change the drive letter as the computers are returned to default with no settings or files saved once we log off.

I have had some success with starting portable programs off the usb by omitting the drive letter eg

@echo off
cls
start /d "\Sublime Text 2.0.1" sublime_text.exe


The file paths are

C:\Users\synthet1c\Documents/web_design
H://TAFE/web_design
USB://TAFE/web_design

the filesize is under 2 gig as that is the limit I have at school.

What I want the batch file to do is replace the oldest file with the newest file and have an autorun.ini file to do it whenever the usb is plugged in. It's not dj related but could easily be substituted to copy music folders/database/playlists etc.. instead of my design stuff by changing the destination folders.

**having two separate batch files would be okay but I would prefer an if statement so it can autorun**

in VDJ Script it would look like this LOL

"H:\\" ? "H:\\~" last_to_update ? "H:\\~" copy to USB : USB to "C:\\~" : "C:\\~" last_to_update ? copy "C://~" USB : copy USB to "H:\\~"

In English/javascript syntax

if (H Drive exists){
___if(H Drive was the most recent updated){ copy H to USB
___}else { copy USB to H drive
___}
} else if (C drive was the most recently updated){ copy C drive to USB
___} else { copy USB to C drive
}
 

Posted Thu 01 Nov 12 @ 9:21 pm


(Old topics and forums are automatically closed)