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
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 7 4,943 Mar-09-2025, 04:25 PM
Last Post: Pedroski55
  use of shutil.copytree with ENOTDIR exception yan 2 4,823 Nov-29-2023, 03:02 PM
Last Post: yan
  Move a particular row in pandas data frame to last row klllmmm 0 6,584 Dec-27-2021, 09:11 AM
Last Post: klllmmm
  extra slashes in the network path for shutil.copy tester_V 3 6,107 Jun-02-2021, 07:57 AM
Last Post: supuflounder
  How to make a test data file for the full length of definition? MDRI 6 5,989 Apr-16-2021, 01:47 AM
Last Post: MDRI
  concatenat - shutil jmabrito 3 3,611 Feb-11-2021, 12:17 PM
Last Post: jmabrito
  want to make auto login with data R3born 3 3,789 Sep-11-2020, 07:06 PM
Last Post: R3born
  Shutil FileNotFoundError: Errno 2 Help lord_kaiser 8 17,179 Aug-10-2020, 08:45 AM
Last Post: lord_kaiser
  shutil.copy questions kristianpython 3 4,053 Jul-14-2020, 09:19 AM
Last Post: Gribouillis
  Shutil move if file exists in destination Friend 2 11,563 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