Author Topic: Rename & Delete Dwg File  (Read 4928 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Rename & Delete Dwg File
« Reply #15 on: September 21, 2004, 02:58:38 PM »
Ok, I'm having a hard time finding out how to delete the original file....any hints?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16727
  • Superior Stupidity at its best
Rename & Delete Dwg File
« Reply #16 on: September 21, 2004, 03:50:29 PM »
Ok ... I will tell you but you MUST BE CAREFUL ....
There is a potential for serious consequenses if you are not.

Code: [Select]

FileSystem.Kill "DriveLetterFullPathFileNameFileExtension"


It accepts wildcards "*" and "?" to specify multiple files.

For example ... this will delete ALL files in the root folder, so please don't try it ...
Code: [Select]

FileSystem.Kill "C:\\*.*"
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

M-dub

  • Guest
Rename & Delete Dwg File
« Reply #17 on: September 21, 2004, 03:53:46 PM »
Cheers...
If all goes as planned, there should be no errors.  Fingers are always crossed though.

;)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16727
  • Superior Stupidity at its best
Rename & Delete Dwg File
« Reply #18 on: September 21, 2004, 04:31:27 PM »
Just make sure to verify the filename BEFORE you tell it to delete...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal