Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:02:55+00:00 2026-06-10T12:02:55+00:00

Hell all, I’m a newbie of Batch File I have a batch File like:

  • 0

Hell all, I’m a newbie of Batch File
I have a batch File like:

@ECHO OFF
if not exist To_delete mkdir To_delete
if not exist resources mkdir resources
copy "C:\icon.png" "resources"

cd /d To_delete
echo The current folder is : "%CD%"
echo The icon.png is located at "CODE_I_NEED_IS_HERE"

The result should be:
The current folder is : C:\Users\Leona\Desktop\To_delete\
The icon.png is located at C:\Users\Leona\Desktop\Resource\

Attention: I don’t want to get the path of icon.png by CD in that folder, what i want is to retrieve the files inside resources folder when the current folder is “To_delete”.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:02:56+00:00Added an answer on June 10, 2026 at 12:02 pm
    @ECHO OFF
    if not exist To_delete mkdir To_delete
    if not exist resources mkdir resources
    copy "C:\Documents and Settings\mlastg\Desktop\logo.png" "resources"
    
    cd /d To_delete
    echo The current folder is : "%CD%" 
    dir /s/b/A:-D "%CD%\..\resources"
    

    Last command will give you the path of all the files in the resources folder. now you can elaborate to get your answer

    C:\Documents and Settings\mlastg\Desktop>batch.bat
            1 file(s) copied.
    The current folder is : "C:\Documents and Settings\mlastg\Desktop\To_delete"
    C:\Documents and Settings\mlastg\Desktop\resources\logo.png
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hell All, So I have been facing this behavior for quite some time and
Hell all, I have made use of the following ignore_user_abort . ignore_user_abort(true); set_time_limit(0); session_start();
I'm confused as hell with all the bazillion ways to read/write/create excel files. VSTO,
I keep hearing about DLL hell - what is this all about?
I normally program in C++, so all this DataSource/DataSet/Binding stuff is confusing the hell
I am new to Spring and ROO and this Annotation/Aspect hell. I have an
First of all, this is not schoolwork - just my curiousity as I for
This is basically all I'm doing echo @file_get_contents(http://******.org/ti.php?i=.$i.&s=.$s); But when I remove the ti.php
Hello All I am using infragsitics tree view control.I have one stored procedure that
Hell all, I am currently trying to create a few object dynamically in code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.