Moving files between folders

后端 未结 5 473
故里飘歌
故里飘歌 2020-12-02 18:30

I want to copy/paste a file from one folder to another folder in windows using R, but it\'s not working. My code:

> file.rename(from=\"C:/Users/msc2/Desk         


        
5条回答
  •  旧巷少年郎
    2020-12-02 19:05

    You are missing a "t" letter in the second extension. Try this:

    file.rename(from="C:/Users/msc2/Desktop/rabata.txt",to="C:/Users/msc2/Desktop/Halwa/BADMASHI/SCOP/rabata.txt").
    

    Additionally, it could be worth it to try the file.copy() function. It is specifically designed to copy files instead of renaming.

提交回复
热议问题