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

Script delete tmp folder

Guest
Sep 24, 2013 Sep 24, 2013

Copy link to clipboard

Copied

Does anyone have a simple script that allows for deletion of a folder.  Scenario would be a temporary folder stored in specific location like C: drive.  I am able to already delete files inside folder with a simple for statement looping and removing.  However I dont seem to be able to figure out how to delete the actual file.

Any example is appreciated.

TOPICS
Scripting

Views

2.1K

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

correct answers 1 Correct answer

Contributor , Sep 24, 2013 Sep 24, 2013

I presume you mean Folder.

Have you tried using the Folder.remove() method?

What happens when you try.

Dave

Votes

Translate

Translate
Contributor ,
Sep 24, 2013 Sep 24, 2013

Copy link to clipboard

Copied

I presume you mean Folder.

Have you tried using the Folder.remove() method?

What happens when you try.

Dave

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
Advisor ,
Sep 24, 2013 Sep 24, 2013

Copy link to clipboard

Copied

Also, make sure you have the permission to remove the folder. The one place it shoud be safe on the C drive is the userdata folder, and for that you have a nice "shortcut": Folder.userData

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
Guest
Sep 25, 2013 Sep 25, 2013

Copy link to clipboard

Copied

Thank you for this info.    Indeed I did use the Folder.remove() method thru my own variable.  It turns out I solved it, I had to adjust the path that my variable was pointing too.  Once I did that, it worked correctly.

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
Advocate ,
Sep 25, 2013 Sep 25, 2013

Copy link to clipboard

Copied

LATEST

Good job. Thanks for reporting back.

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