bill

msg:3753115 | 12:05 am on Sep 27, 2008 (gmt 0) |
The move [technet.microsoft.com] command doesn't have many options for you to play with. move [{/y¦/-y}] [Source] [target] |
| You could use the /-y switch to force the script to prompt you when overwriting existing files. It might be easier to use something like xCopy [technet.microsoft.com] to get the files to the new location and then to delete the files from the old location.
|
andrewsmd

msg:3754422 | 1:05 pm on Sep 29, 2008 (gmt 0) |
I know how to use xCopy, but what is the switch to not overwrite file within that command. Most of the time when I am copying files I use something like xcopy "sourcePath" "destinationPath" /e /i /c /s /k /y
|
andrewsmd

msg:3754423 | 1:06 pm on Sep 29, 2008 (gmt 0) |
Also, the y prompt won't work because I want this script to run automatically and not have to watch it.
|
coopster

msg:3754431 | 1:17 pm on Sep 29, 2008 (gmt 0) |
Sometimes you end up jumping through hoops trying to use an antiquated tool to accomplish the task at hand. I still use .bat file scripts on occasion myself, but when it comes to a bit more *advanced* system work, tools such as perl/php make the task a piece of cake. Have you considered executing a scripted process from your .bat file?
|
andrewsmd

msg:3754482 | 2:38 pm on Sep 29, 2008 (gmt 0) |
No, I could whip this out with php in about 10 minutes. How would I execute that from the dos prompt then. This bat file is running on a computer we will call machine1, but my php server is on a completely different machine. I have the folder where all of my php files are shared with the administrator so I can get to the folder, but how to I call a php script from the dos shell and also, how does output work when you do something like that. Thanks,
|
coopster

msg:3754543 | 4:02 pm on Sep 29, 2008 (gmt 0) |
| but how to I call a php script from the dos shell and also, how does output work when you do something like that. |
| Using PHP from the command line [php.net]
|
bill

msg:3755212 | 2:04 am on Sep 30, 2008 (gmt 0) |
| I know how to use xCopy, but what is the switch to not overwrite file within that command. |
| It actually gets a bit more complicated, but you can use the /l switch to list the files to be copied and then run a for...next loop to only copy the file names that don't exist. A better option than xCopy might be Robocopy [technet.microsoft.com], but it may not be available natively on your platform.
|
tangor

msg:3755223 | 2:42 am on Sep 30, 2008 (gmt 0) |
use IF %f NOT EXIST in the command line (If I recall correctly... been a long time since DOS.
|
andrewsmd

msg:3755226 | 2:53 am on Sep 30, 2008 (gmt 0) |
I have used IF NOT EXIST before but never with the %f what does that do. I'm not gonna lie I really don't know that much about MS DOS I'm a web programmer
|
andrewsmd

msg:3755461 | 11:58 am on Sep 30, 2008 (gmt 0) |
While we are in this forum. Does anyone know how to echo the date modified on a file with dos in a readable format. Like YYYYMMDDHHIISS? Thanks,
|
|