Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't I copy files in script?

Status
Not open for further replies.

nabob1

Programmer
Jul 18, 2003
44
US
Can someone explain why I keep getting the output indicated below when I want to rename a file in a script, thanks


mv: 0653-401 Cannot rename SAVE.TST to SAVE.07/21/03073543:
A file or directory in the path name does not exist.
 
hi,
probably you cannot use a slash character "/" in filename:
the shell interpretes it as a dir meaning and look for
a dir named SAVE.07/21/ and filename as 03073543

If you need, absolutely use this name do:

mv SAVE.TST "SAVE.07/21/03073543"

but if you do, also when you enter command as ls,rm,ecc
you must use

ls "SAVE.07/21/03073543"

You will not be able to use wildcards as

ls "SAVE.07/21/*",

but only SAVE.07*

I suggest, if you can, to use a different separator as ":" or "-" : your life, tomorrow could be easier !

bye
 
your future-self will thank your present-self greatly if you avoid using slashes in file names.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top