Python Forum
shutil.move make data corrupt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shutil.move make data corrupt
#1
hi sorry for my bad English,
i have this code:
            SaveAs = "new folder name that contains illegal character !@#$%^&*"
           #SaveAs = re.sub(r'[^\w]', ' ', SaveAs)# I learn it in a hard way
            print("SaveAs : " + SaveAs)
            if not os.path.exists(SaveAs):
                os.mkdir(SaveAs)
            shutil.move(file,SaveAs+"\\")
if that certain case
the result data are
1. cannot be deleted or renamed,
2. full size as raw size,
3. you can copy it to another folder or drive, but the result is the same as Number 1.

my question is:
A. is the data recoverable? if it is, how?
B. can this "shutil" package caretaker update so the next version of somebody else not have a case like mine?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  use of shutil.copytree with ENOTDIR exception yan 2 919 Nov-29-2023, 03:02 PM
Last Post: yan
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 5 1,607 Aug-28-2022, 07:11 AM
Last Post: Melcu54
  Move a particular row in pandas data frame to last row klllmmm 0 3,777 Dec-27-2021, 09:11 AM
Last Post: klllmmm
  extra slashes in the network path for shutil.copy tester_V 3 3,787 Jun-02-2021, 07:57 AM
Last Post: supuflounder
  How to make a test data file for the full length of definition? MDRI 6 3,571 Apr-16-2021, 01:47 AM
Last Post: MDRI
  concatenat - shutil jmabrito 3 2,209 Feb-11-2021, 12:17 PM
Last Post: jmabrito
  want to make auto login with data R3born 3 2,225 Sep-11-2020, 07:06 PM
Last Post: R3born
  Shutil FileNotFoundError: Errno 2 Help lord_kaiser 8 10,558 Aug-10-2020, 08:45 AM
Last Post: lord_kaiser
  shutil.copy questions kristianpython 3 2,328 Jul-14-2020, 09:19 AM
Last Post: Gribouillis
  Shutil move if file exists in destination Friend 2 6,783 Feb-02-2020, 01:45 PM
Last Post: Friend

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020