Rename doesn't work

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
putmann
Junior Coder
Posts: 24
Joined: Mon Aug 20, 2007 1:15 am
Location: Queens,NY

Rename doesn't work

Post by putmann » Fri Dec 09, 2011 8:41 pm

This is embarrassing, but I'm trying a simple rename and it doesn't work. Using version 7.4. Any hints?

Code: Select all

Let>MF_RENAME=1
MoveFile>\\n2k3wb972ftp01\ftproot\FTPholly\CashFR.txt,\\nasdata02\sharedata\finpcp\Archive\C\Cash\FR Cash files\CashFR2.txt
Let>MF_RENAME=0

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 09, 2011 10:58 pm

Just a guess but it would seem to me that using "MF_RENAME" implies the file remains in its current folder. Set the first "MF_RENAME" to zero rather than one and see if the code works.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat Dec 10, 2011 8:41 pm

I've recently been struggling with renaming and moving too. From my testing it doesn't appear possible to move and rename in one step. Also there are complications related to over-writing existing files which I have not been able to resolve without a adding a prior step to delete them. I think you'll have to break it down to a move plus a rename and you'll probably have to delete any existing destination file first - but that's just my opinion.

7.4 eh? Still old 9.1 here :)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Rename doesn't work

Post by Marcus Tettmar » Sat Dec 10, 2011 11:01 pm

putmann wrote:This is embarrassing, but I'm trying a simple rename and it doesn't work. Using version 7.4. Any hints?

Code: Select all

Let>MF_RENAME=1
MoveFile>\\n2k3wb972ftp01\ftproot\FTPholly\CashFR.txt,\\nasdata02\sharedata\finpcp\Archive\C\Cash\FR Cash files\CashFR2.txt
Let>MF_RENAME=0
This is a move not a rename. The destination is different. Remove the Let>MF_RENAME=1 line, or set it to zero.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts