Re: file rename newbie help



massimo.coletti@xxxxxxxxx wrote:
> Hi all,
>
> I have a (quite complex) tcl script with the line:
>
> puts "EXIST [file exists $dumpDir]"
> file rename $dumpDir $loadDir
>
> and I get the output:
>
> EXIST 0
> error renaming "IAS-Finnat_5-1": no such file or directory
> while executing
> "file rename $dumpDir $loadDir"
> (file "e:/cvs/xbrl/cvtdb/upgrade.tcl" line 43)
>
> but the origin directory exists:
>
> $ ls
> CP04_5-0_Backup.mdb IAS-Finnat_5-0_ol.mdb IAS-Finnat_5-1.ldb
> Prova_5-1.mdb
> CP04_5-1.mdb IAS-Finnat_5-1 IAS-Finnat_5-1.mdb
>
> the same behaviour is under Windows (XP) and under cygwin, both at 8.4
>
> Any hint?
>
> Thanks,
>
> Massimo

Does the directory you want to rename exist under the same directory
where you launch your script? Try providing the full path to [file
rename], for both $dumpDir and $loadDir.

Rgrds,
Khaled

.



Relevant Pages

  • file rename newbie help
    ... while executing ... "file rename $dumpDir $loadDir" ...
    (comp.lang.tcl)
  • Re: file rename newbie help
    ... "file rename $dumpDir $loadDir" ... the file rename works in the current pwd, so if your script is not ...
    (comp.lang.tcl)
  • file rename -force failing silently
    ... file rename -force somenewdata.file someexistingdata.file is ... behaving in a way that surprises me. ... Surely 'file rename' should easily be able to detect that the rename ...
    (comp.lang.tcl)
  • Re: Renaming files
    ... Search for file rename utility... ... I used to utilize a shareware program called RenameWiz... ...
    (microsoft.public.windowsxp.basics)