informix - file movement from one directory to another -


i have variable holds file name , location of file, need move file 1 location another.how can done using informix 4gl

the run command used:

let cmd = "mv ", old_location, "/", file_name, " ", new_location  run cmd 

this assumes old_location, file_name , new_location varchar variables , not char variables. if char, need strip trailing blanks before concatenating:

let cmd = "mv ", old_location clipped, "/", file_name clipped, " ", new_location clipped 

(you omit last clipped.) assumes there no spaces in file names or locations. have work bit harder if spaces can present; have work considerably harder if need deal quotes or newlines (etc) in file names.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -