MC Press Online Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Rename an IFS file in remote location (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Rename an IFS file in remote location
#122070
sudesh (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Rename an IFS file in remote location 1 Month, 3 Weeks ago Karma: 0  
Hi folks,

I have a csv file in my IFS directory (on machine 1) and it’s being FTP to another machine
(Machine 2). My problem is I need to rename the csv file (on machine 2) after the FTP process.
Could anyone give me an idea or code sample for how to rename an IFS file in remote location would really appreciate.

Ex:-

On Machine 1

Ifs Path: /Root/Dir1/
File Name: MyfileA.csv

then it will transfer over to Machine 2 using separate FTP process and there is no way to change the file name before that.

On Machine 2

Ifs Path: /Root/Dir2/
File Name: MyfileA.csv


Now I need to change the file name to (MyfileB.csv) form Machine 1


If any input would appreciate.
Cheers,
Sudesh
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#122071
jan_jorgensen (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Rename an IFS file in remote location 1 Month, 2 Weeks ago Karma: 0  
Hi,

Make sure you are in namefmt 1 mode

namefmt 1

Then use the FTP rename/ren command

ren /rootdir/mydir/myfileA.csv /rootdir/mydir/myfileB.csv

or do a

cd /rootdir/mydir
ren myfileA.csv myfileB.csv

Hope it helps...

- Jan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#122072
jan_jorgensen (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:Rename an IFS file in remote location 1 Month, 2 Weeks ago Karma: 0  
I forgot...

You can also do it in the PUT right away like

put /rootdir/mydir/myfileA.csv /rootdir/mydir/myfileB.csv

- Jan
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#122074
sudesh (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:Rename an IFS file in remote location 1 Month, 2 Weeks ago Karma: 0  
Thank you for all your comments.
Happy to say that it’s done.

I used the QSHELL to rename the file and RUNRMTCMD used to execute it on remote machine. Thank again for all inputs


Cheers,
Sudesh
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
   MC-STORE.COM