Jump to content











Photo
* * * * * 1 votes

[Fixed] The usage of the FileDelete with *.* wildcards


  • Please log in to reply
9 replies to this topic

#1 Max_Real Qnx

Max_Real Qnx

    Gold Member

  • Patrician
  • 1382 posts
  • Location:Istanbul
  • Interests:To be or not to be that is the question.
  •  
    Turkey

Posted 15 March 2010 - 08:01 PM

FileDelete,"%Target_Sys\*.*"

Why does this command erase if there are subdirectories of destination folder ? Nevertheless, I only want the files in the destination folder to be deleted.

http://winbuilder.ne...html#FileDelete


Best regards :thumbup:

#2 was_JFX

was_JFX

    Frequent Member

  • Advanced user
  • 483 posts
  •  
    Germany

Posted 15 March 2010 - 08:36 PM

Similar problem also exist to Filecopy

This line of Multi7 project is supposed to copy all .exe files from boot.wim windows to target windows folder

FileCopy,"%bw%\*.exe","%tw%\"
but it also creates sub folders and files in winsxs directory.

:thumbup:

#3 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 15 March 2010 - 09:20 PM

@JFX

I found the solution of yours

FileCopy,"%bw%\*.exe","%tw%\",norec

@Max_Real Qnx,

sorry, norec is not available with filedelete

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 15 March 2010 - 09:25 PM

The deault behaviour of the file commands was changed. upon request from Vista or Win7 projects, if i remember right.
I already complained about this back then, but because the behaviour was already heavy in use, Peter did not wanted to change it, so that non recursive would have been default again.

:thumbup:

#5 PaPeuser

PaPeuser

    Silver Member

  • Advanced user
  • 787 posts
  •  
    United States

Posted 15 March 2010 - 10:02 PM

@ Lancelot .. i tested your fix with 64 .. more programs work Thanks...............

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 April 2010 - 01:26 PM

I added NOREC to FileDelete.

Syntax now:
FileCopy,FromFile,ToDir[,PRESERVE][,NOWARN][,NOREC][,SHOW]

FileDelete,FileToDelete[,NOWARN][,NOREC]

DirCopy,FromDir,ToDir[,SHOW]

DirDelete,DirToDelete[,FAST]
Please take care that magic wand is should be correct, while syntax.html is not always actually updated.

Peter

#7 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 06 April 2010 - 01:48 PM

So you're back on the development team, Peter?

:whistling:

#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 06 April 2010 - 01:53 PM

All the time I was in the development team, and did a lot of bug fixes and enhancements.

I only decided to stop wasting my time when I try to discuss ideas and then have to read about my lying and aftergaming etc.

As I already told you in a different topic:

Ignoring posts which are not worth to read, gives a lot of time to do senceful things!

Peter :whistling:

#9 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 06 April 2010 - 02:31 PM

Ahh, Ok. I just had the impression, that you've had left, becaue of said postings.
Glad to have been wrong.

:whistling:

#10 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 06 April 2010 - 11:17 PM

Hi Peter,

Thanks -- NOREC added to FileDelete is a nice improvement!

Regards,
Galapo.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users