![]() |
|
|||||||
| DirMon Discussion Discussion related to the DirMon application produced by Dragon Global. Questions, issues, problems, suggestions, etc. regarding Dragon Global should be posted here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I've been pulling my hair out trying to set up DirMon2 to move a file when it finds the one I specify.
I've tried every format I could concieve trying to pass the filename to a batch file. Such as: running move.bat Command Line Option: [[%FULLFILESPEC%]] Batch file move.bat: ...well, aparently when I type code with two backslashes (ie: UNC directory), you loose the rest of the message. Moving on. You get the point. I need to move a file. Passing options to a batch file, or simply running cmd with the move command in the options line (with variables and directories of course) just isn't working for me. I'm out of variations to try. I'd like it if unhiding the console window actually meant a console window would come up, and I could see what was happening. I don't see what I need in the Current Status window, or the log files. If you have some suggestions, I'd appreciate it. Thank You! Last edited by vhurst; 05-22-2008 at 04:22 AM. Reason: I typed much more the first time, but the msg was truncated. |
|
||||
|
Quote:
Quote:
Code:
move /? Code:
Moves files and renames files and directories.
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2
[drive:][path]filename1 Specifies the location and name of the file
or files you want to move.
destination Specifies the new location of the file. Destination
can consist of a drive letter and colon, a
directory name, or a combination. If you are moving
only one file, you can also include a filename if
you want to rename the file when you move it.
[drive:][path]dirname1 Specifies the directory you want to rename.
dirname2 Specifies the new name of the directory.
/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite
an existing destination file.
The switch /Y may be present in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless MOVE command is being executed from
within a batch script.
You might try putting this in a batch file: Code:
move /Y %1 D:\NewDir\ If you want to see what it did try adding a pause at the end. Something like this: Code:
move /Y %1 D:\NewDir\ pause Another thing to keep in mind is that if the destination directory has spaces in it then you need to surround it in quotes. Did that help? Jere
__________________
DEATH TO ALL COMMERCIALS Latest Stable: ShowAnalyzer 1.0.58 - 31 Jan 2010 Latest: DirMon2 Beta 0.6.4 - 8 May 2008
|
|
|||
|
Better late than never?
Thanks Jere, yes that did the trick. I just set up my new Sage server, and needed to do the same trick of moving a file with DirMon2. I was having trouble figuring it out again, and found this thread when you clued me in the last time. I was inclined to try to set "program to run" to cmd, set my target (img in this case), and set "command line options" to: Code:
move [[%FULLFILESPEC%]] \\pops\DVD_Images Code:
move "D:\SageVideo\movie image name.img" \\pops\DVD_Images Creating the batch file you illustrated (I used UNC pathnames), and passing in the variable with the %1 works just dandy... ![]() Thanks for the help! |
|
|||
|
I came up with an even better batch file:
Code:
move /Y %1 %2 |
|
||||
|
Cool.
Jere
__________________
DEATH TO ALL COMMERCIALS Latest Stable: ShowAnalyzer 1.0.58 - 31 Jan 2010 Latest: DirMon2 Beta 0.6.4 - 8 May 2008
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|