![](templates/Classic/images/spacer.gif) |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sun Dec 17, 2006 3:44 am
#launch and copy, rename or xcopy |
I have a problem where I would like to start with a text file in one directory, move it to another directory, and rename it there. I first tried to do this with
Code: |
#launch {xcopy c:\~"program files~"\cmud\tempitemid.txt c:\~"documents and settings~"\~"big daddy~"\~"my documents~"\mud\foxmud\EQ\individualeqfiles\newname.txt} |
but when this runs, xcopy prompts me manually to indicate if the source location is a file or a directory... by what I've read on the web the only way around this is to install xxcopy... doable but I'd like to find a solution that doesnt entail installing more software.
So my next try (and current one) was to just copy it over using xcopy then rename it. I've managed to get the file copied, now I'd like to rename it for which ive tried to use
Code: |
#launch {rename c:\~"documents and settings~"\~"big daddy~"\~"my documents~"\mud\foxmud\EQ\individualeqfiles\tempitemid.txt aaaaaxxxx.txt} |
but when I use this, nothing happens. I've also tried using the copy command in a similar fashion without successs. The best way I can think of is to create a batch file, then execute the batch file in the same manner, but that seems like an extra step. I'd rather figure out the correct syntax to get this rename line to work. Any help would be appreciated. |
|
|
![](templates/Classic/images/spacer.gif) |
shalimar GURU
![](images/avatars/114658559147aeed8fee539.gif)
Joined: 04 Aug 2002 Posts: 4674 Location: Pensacola, FL, USA
|
Posted: Sun Dec 17, 2006 7:10 am |
instead of quoting out each folder with spaces in it, try quoting the entire pathname
|
|
_________________ Discord: Shalimarwildcat |
|
|
![](templates/Classic/images/spacer.gif) |
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: Sun Dec 17, 2006 10:20 am |
Or just use copy instead of xcopy, which doesn't prompt
|
|
_________________ CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;) |
|
|
![](templates/Classic/images/spacer.gif) |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sun Dec 17, 2006 3:08 pm |
I've tried to use the copy command, but I can't figure out the syntax for it. I tried using the same type of syntax as I showed for rename...
|
|
|
![](templates/Classic/images/spacer.gif) |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sun Dec 24, 2006 3:29 am |
I've tried using the DOS copy command to copy and/or move some files with cmud. I can get xcopy to work, however I cant get copy to work. Instead, I've been writing to a batch file, then launching the batch file. I'd like to remove that step if possible. the string I write to my batch file is:
Code: |
#launch {move c:\~"program files~"\cmud\tempitemid.txt c:\~"documents and settings~"\~"big daddy~"\~"my documents~"\mud\foxmud\EQ\individualeqfiles\~"@newname~"} |
which again, when launched in a batch file, works. (I know, I use move above, but I figure the same principle applies to copy)However I can't figure out how to do it from CMUD directly. In order to simplify things a bit and see where to start, I've been trying:
Code: |
#launch {copy c:\xcopytestfile.txt c:\eqfol\fatmanstest.txt} |
This command definitely works from the command line. I'm kinda thinkin that for windows doesnt recognize "copy" as an executable file (im not sure if it should or not)... I know I can use #launch cmd to get a command prompt up, is there maybe a way to use something like
Code: |
#launch {cmd;copy c:\xcopytestfile.txt c:\eqfol\fatmanstest.txt} |
????? This didnt work by the way... pleease help. This will be very helpfull to me!!!!!! |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Dec 24, 2006 3:56 am |
You might be running into security mechanisms built into ZMud/CMud to prevent users from messing up their or other peoples' systems. I know Zugg prevents the use of format, but I don't know if he's doing that based on the specific list of bad commands or simply blacking out the execution of anything in a system folder (which would generally be where those bad commands are located).
He really wants to avoid connecting ZMud/CMud directly to anything that appears malware-ish. |
|
_________________ EDIT: I didn't like my old signature |
|
|
![](templates/Classic/images/spacer.gif) |
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Sun Dec 24, 2006 4:11 am |
I think #launch will open any .exe file. cmd.exe exists in the windows\system32 folder. xcopy.exe also exists in this folder. I think because xcopy.exe is an executable is why I can open it. there is no copy.exe or move.exe as these are commands within DOS (i thnk). I was just going to ask if a #doscopy and/or #dosmove could be incorporated into cmud, but I see why that might be bad mojo...
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|