• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfdirectory

New Here ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

Hopefully this will be easy...running on Windows Server 2003, Apache, CF8.

I tell it to delete a folder inside my "boxes" directory, it also deletes the "boxes" directory also and everything in it.

<cfdirectory directory="e:\Apache2.2\htdocs\sites\smart\dropbox\boxes\#deletedrop.drop_folder_name#" action="delete" recurse="yes">

#deletedrop.drop_folder_name# is coming out as 21643-1(A)-jhkhj, so I know that its getting the correct variable.

Example: I have a folder inside the directory "boxes" directory called "21643-1(A)-jhkhj" that I want to delete and everything inside it. The above code is deleting all directories inside the boxes directory including itself.

Thanks for any help.

Matthew
TOPICS
Getting started

Views

669

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

Hi Matthew,

You mean that, it is actually deleting the "boxes" directory too?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

I don't mean to sound rude, but the first line of my post explains that, yes, it deletes the boxes directory also. I just want it to delete one directory inside the "Boxes" directory and all the contents inside that targeted folder.

Matthew

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 25, 2009 Mar 25, 2009

Copy link to clipboard

Copied

LATEST
Some ideas...

Try putting a slash after #deletedrop.drop_folder_name#"

Also, if that variable is not correct, it will truncate and likely delete the boxes directory.

Do a CFDUMP on that page and make sure the variable is correct.

Use the TRIM function around the variable to make sure there are no leading or trailing spaces.

One of those should lead you to the problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation